forked from ReikaKalseki/DragonIndustries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
control.lua
62 lines (41 loc) · 1.26 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
require "entitytracker"
--require "eventhandling"
function initGlobal(markDirty)
if not global.dragonindustries then
global.dragonindustries = {}
end
local di = global.dragonindustries
di.dirty = markDirty
end
script.on_configuration_changed(function()
initGlobal(true)
end)
script.on_init(function()
initGlobal(true)
end)
script.on_load(function()
end)
function onCommand(event)
end
function onEntityRotated(event)
end
function onEntityAdded(event)
end
function onEntityRemoved(event)
end
function onEntityDied(event)
onEntityRemoved(event)
end
function onGameTick(event)
local tick = event.tick
end
script.on_event(defines.events.on_console_command, onCommand)
script.on_event(defines.events.on_entity_died, onEntityDied)
script.on_event(defines.events.on_pre_player_mined_item, onEntityRemoved)
script.on_event(defines.events.on_robot_pre_mined, onEntityRemoved)
script.on_event(defines.events.script_raised_destroy, onEntityRemoved)
script.on_event(defines.events.on_built_entity, onEntityAdded)
script.on_event(defines.events.on_robot_built_entity, onEntityAdded)
script.on_event(defines.events.on_player_rotated_entity, onEntityRotated)
--script.on_event(defines.events.on_entity_damaged, onEntityDamaged)
script.on_event(defines.events.on_tick, onGameTick)