-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontrol.lua
More file actions
28 lines (22 loc) · 710 Bytes
/
control.lua
File metadata and controls
28 lines (22 loc) · 710 Bytes
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
27
28
local Entity = require("scripts/entity")
local DisableRegularRollingStock = require("scripts/disable-regular-rolling-stock")
local function CreateGlobals()
Entity.CreateGlobals()
end
local function OnLoad()
--Any Remote Interface registration calls can go in here or in root of control.lua
Entity.OnLoad()
end
local function OnSettingChanged()
end
local function OnStartup(event)
CreateGlobals()
OnLoad()
OnSettingChanged(nil)
Entity.OnStartup(event)
DisableRegularRollingStock.OnStartup(event)
end
script.on_init(OnStartup)
script.on_configuration_changed(OnStartup)
script.on_event(defines.events.on_runtime_mod_setting_changed, OnSettingChanged)
script.on_load(OnLoad)