Realistic Decoration Cleanup


Remove decorations prior to placing entities or tiles. In real life you would not build a house/road and leave the bushes below it, would you?

Tweaks
13 days ago
0.15 - 2.0
21.7K
Environment

g Compatibility with Construction Drones

5 years ago

Currently this mod is not compatible with the construction drones mod.
The script_raised_revive needs to be checked, as this is raised when the drones revive a ghost.

Here is my modification:
script.on_event(defines.events.script_raised_revive, function(event)
game.print("Here")
if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" then
game.surfaces[1].destroy_decoratives{area=event.entity.bounding_box}
end
end)

5 years ago

Doesnt revive entity imply that there already was built an entity on that position before and therefore there should be no recorations there anymore to remove?

5 years ago

There may be decorations on the position if the revive is applied to a ghost entity.
Due to the fact that ghosts do not remove the decorations they have to be removed on revive.

New response