From 1c810f598ec6b6dcf348d5ed83a35ed85e7b2df9 Mon Sep 17 00:00:00 2001 From: Someone Date: Sat, 1 Jun 2019 20:33:53 +0200 Subject: [PATCH] Use entities' selection_box instead of bounding_box to remove more decorations. --- control.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/control.lua b/control.lua index 760540a..a6b0a46 100644 --- a/control.lua +++ b/control.lua @@ -1,12 +1,12 @@ --[[get dir of decorations under entities]] script.on_event(defines.events.on_built_entity, function(event) if event.created_entity.type ~= "entity-ghost" and event.created_entity.type ~= "tile-ghost" then - game.surfaces[1].destroy_decoratives{area=event.created_entity.bounding_box} + game.surfaces[1].destroy_decoratives{area=event.created_entity.selection_box} end end) script.on_event(defines.events.on_robot_built_entity, function(event) if event.created_entity.type ~= "entity-ghost" and event.created_entity.type ~= "tile-ghost" then - game.surfaces[1].destroy_decoratives{area=event.created_entity.bounding_box} + game.surfaces[1].destroy_decoratives{area=event.created_entity.selection_box} end end) -- 2.43.0