forked from Nexela/Nanobots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontrol.lua
23 lines (16 loc) · 906 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')
local Interface = require('__stdlib__/stdlib/scripts/interface').merge_interfaces(require('interface'))
local Commands = require('commands')
Event.protected_mode = true
Event.build_events = {defines.events.on_built_entity, defines.events.on_robot_built_entity}
Event.mined_events = {defines.events.on_pre_player_mined_item, defines.events.on_robot_pre_mined}
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(true)
Player.additional_data({ranges = {}})
require('scripts/nanobots')
require('scripts/robointerface')
require('scripts/armormods')
require('scripts/reprogram-gui')
remote.add_interface(script.mod_name, Interface)
commands.add_command(script.mod_name, 'Nanobot commands', Commands)