From 1ee4451abc105ebf15c809d6ca0f5df8aa562ee2 Mon Sep 17 00:00:00 2001 From: Someone Date: Sun, 14 Feb 2021 14:18:24 +0100 Subject: [PATCH] add support new event types --- control.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/control.lua b/control.lua index a6b0a46..bdf4f79 100644 --- a/control.lua +++ b/control.lua @@ -10,3 +10,15 @@ script.on_event(defines.events.on_robot_built_entity, function(event) game.surfaces[1].destroy_decoratives{area=event.created_entity.selection_box} end end) + +script.on_event(defines.events.script_raised_built, function(event) + if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" then + game.surfaces[1].destroy_decoratives{area=event.entity.selection_box} + end +end) + +script.on_event(defines.events.script_raised_revive, function(event) + if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" then + game.surfaces[1].destroy_decoratives{area=event.entity.selection_box} + end +end) -- 2.43.0