Use the correct hook
This commit is contained in:
parent
fd4316b844
commit
d686f94080
1 changed files with 2 additions and 2 deletions
|
@ -547,12 +547,12 @@ end
|
|||
|
||||
|
||||
-- Set up callbacks
|
||||
script.on_event({ defines.events.on_built_entity, defines.events.on_robot_built_entity, defines.events.script_raised_built }, onEntityCreated)
|
||||
script.on_event({ defines.events.on_built_entity, defines.events.on_robot_built_entity, defines.events.script_raised_revive }, onEntityCreated)
|
||||
|
||||
|
||||
-- on_entity_died and script_raised_destroy should trigger both functions -> called manually
|
||||
script.on_event({ defines.events.on_player_mined_entity, defines.events.on_robot_mined_entity, defines.events.on_entity_died, defines.events.script_raised_destroy }, onEntityRemoved)
|
||||
script.on_event({ defines.events.on_pre_player_mined_item, defines.events.on_pre_robot_mined_item, defines.events.on_entity_died }, preEntityRemoved)
|
||||
script.on_event({ defines.events.on_pre_player_mined_item, defines.events.on_pre_robot_mined_item, defines.events.on_entity_died, defines.events.script_raised_destroy }, preEntityRemoved)
|
||||
|
||||
|
||||
local functions = generateFunctions()
|
||||
|
|
Reference in a new issue