-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathcontrol.lua
23 lines (16 loc) · 1013 Bytes
/
control.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
local Event = require('__stdlib__/stdlib/event/event').set_protected_mode(true)
local Interface = require('__stdlib__/stdlib/scripts/interface').merge_interfaces(require('interface'))
local Commands = require('commands')
local ev = defines.events
Event.build_events = {ev.on_built_entity, ev.on_robot_built_entity, ev.script_raised_built, ev.script_raised_revive, ev.on_entity_cloned}
Event.mined_events = {ev.on_pre_player_mined_item, ev.on_robot_pre_mined, ev.script_raised_destroy}
local Player = require('__stdlib__/stdlib/event/player').register_events(true)
require('__stdlib__/stdlib/event/force').register_events(true)
require('__stdlib__/stdlib/event/changes').register_events('mod_versions', 'changes/versions')
Player.additional_data({ranges = {}})
require('scripts/nanobots')
require('scripts/roboport-interface')
require('scripts/armor-mods')
require('scripts/reprogram-gui')
remote.add_interface(script.mod_name, Interface)
commands.add_command(script.mod_name, 'Nanobot commands', Commands)