]> git.somenet.org - factorio/RealisticDecorationCleanup.git/blob - control.lua
RELEASE 2.0.0 - Initial compatibility with Factorio 2.0
[factorio/RealisticDecorationCleanup.git] / control.lua
1 --[[get rid of decorations under entities]]
2 script.on_event(defines.events.on_built_entity, function(event)
3     if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" and event.entity.prototype.selectable_in_game then
4         game.surfaces[event.entity.surface_index].destroy_decoratives{area=event.entity.selection_box}
5     end
6 end)
7
8 script.on_event(defines.events.on_robot_built_entity, function(event)
9     if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" and event.entity.prototype.selectable_in_game then
10         game.surfaces[event.entity.surface_index].destroy_decoratives{area=event.entity.selection_box}
11     end
12 end)
13
14 script.on_event(defines.events.script_raised_built, function(event)
15     if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" and event.entity.prototype.selectable_in_game then
16         game.surfaces[event.entity.surface_index].destroy_decoratives{area=event.entity.selection_box}
17     end
18 end)
19
20 script.on_event(defines.events.script_raised_revive, function(event)
21     if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" and event.entity.prototype.selectable_in_game then
22         game.surfaces[event.entity.surface_index].destroy_decoratives{area=event.entity.selection_box}
23     end
24 end)