-
Notifications
You must be signed in to change notification settings - Fork 42
/
control.lua
26 lines (19 loc) · 933 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
24
25
26
require "resmon"
require "remote"
-- if this ever happens, I'll be enormously surprised
if not resmon then error("YARM has become badly corrupted: the variable resmon should've been set!") end
-- Enable Lua API global Variable Viewer
-- https://mods.factorio.com/mod/gvv
if script.active_mods["gvv"] then
require("__gvv__.gvv")()
end
script.on_init(resmon.init_globals)
script.on_configuration_changed(resmon.init_globals)
script.on_load(resmon.on_load)
script.on_event(defines.events.on_player_created, resmon.on_player_created)
script.on_event(defines.events.on_tick, resmon.on_tick)
script.on_event(defines.events.on_gui_click, resmon.on_gui_click)
script.on_event(defines.events.on_gui_closed, resmon.on_gui_closed)
script.on_event("get-yarm-selector", resmon.on_get_selection_tool)
script.on_event(defines.events.on_player_selected_area, resmon.on_player_selected_area)
on_site_updated = script.generate_event_name()