--[[get rid of decorations under entities]]
script.on_event(defines.events.on_built_entity, function(event)
if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" and event.entity.prototype.selectable_in_game then
- game.surfaces[event.entity.surface_index].destroy_decoratives{area=event.entity.selection_box}
+ game.surfaces[event.entity.surface_index].destroy_decoratives{area={{event.entity.selection_box.left_top.x-0.6, event.entity.selection_box.left_top.y-0.6}, {event.entity.selection_box.right_bottom.x+0.6, event.entity.selection_box.right_bottom.y+0.6}}}
end
end)
script.on_event(defines.events.on_robot_built_entity, function(event)
if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" and event.entity.prototype.selectable_in_game then
- game.surfaces[event.entity.surface_index].destroy_decoratives{area=event.entity.selection_box}
+ game.surfaces[event.entity.surface_index].destroy_decoratives{area={{event.entity.selection_box.left_top.x-0.6, event.entity.selection_box.left_top.y-0.6}, {event.entity.selection_box.right_bottom.x+0.6, event.entity.selection_box.right_bottom.y+0.6}}}
end
end)
script.on_event(defines.events.script_raised_built, function(event)
if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" and event.entity.prototype.selectable_in_game then
- game.surfaces[event.entity.surface_index].destroy_decoratives{area=event.entity.selection_box}
+ game.surfaces[event.entity.surface_index].destroy_decoratives{area={{event.entity.selection_box.left_top.x-0.6, event.entity.selection_box.left_top.y-0.6}, {event.entity.selection_box.right_bottom.x+0.6, event.entity.selection_box.right_bottom.y+0.6}}}
end
end)
script.on_event(defines.events.script_raised_revive, function(event)
if event.entity.type ~= "entity-ghost" and event.entity.type ~= "tile-ghost" and event.entity.prototype.selectable_in_game then
- game.surfaces[event.entity.surface_index].destroy_decoratives{area=event.entity.selection_box}
+ game.surfaces[event.entity.surface_index].destroy_decoratives{area={{event.entity.selection_box.left_top.x-0.6, event.entity.selection_box.left_top.y-0.6}, {event.entity.selection_box.right_bottom.x+0.6, event.entity.selection_box.right_bottom.y+0.6}}}
end
end)
{
"name": "RealisticDecorationCleanup",
- "version": "2.0.0",
+ "version": "2.0.1",
"title": "Realistic Decoration Cleanup",
"author": "someone1337",
"homepage": "https://git.somenet.org/factorio/RealisticDecorationCleanup.git",
"description": "Remove decorations prior to placing entities or tiles. Normally you would not build a house/road and leave the bushes below it.",
"factorio_version": "2.0",
- "dependencies": ["base>=2.0.0"]
+ "dependencies": [
+ "base>=2.0.0"
+ ]
}