From d686f940800cb45fb7aa21a42b84b035dd4cc326 Mon Sep 17 00:00:00 2001 From: Vivianne Langdon Date: Fri, 24 Feb 2023 23:10:26 -0800 Subject: [PATCH] Use the correct hook --- better-air-filtering/control.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/better-air-filtering/control.lua b/better-air-filtering/control.lua index b35a21a..ec92c8d 100644 --- a/better-air-filtering/control.lua +++ b/better-air-filtering/control.lua @@ -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()