-Copyright (c) 2018-2023 Someone <someone@somenet.org>
+Copyright (c) 2018-2024 Someone <someone@somenet.org>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+---------------------------------------------------------------------------------------------------
+Version: 1.1.3
+Date: 2024-01-02
+
+ Changed:
+ - fix decoration cleanup on non-nauvis.
+
+---------------------------------------------------------------------------------------------------
+Version: 1.1.2
+Date: 2022-01-17
+
+ Changed:
+ - add support for Tapeline mod (hopefully)
+
---------------------------------------------------------------------------------------------------
Version: 1.1.2
Date: 2022-01-17
--[[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" and event.created_entity.prototype.selectable_in_game then
- game.surfaces[1].destroy_decoratives{area=event.created_entity.selection_box}
+ game.surfaces[event.created_entity.surface_index].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" and event.created_entity.prototype.selectable_in_game then
- game.surfaces[1].destroy_decoratives{area=event.created_entity.selection_box}
+ game.surfaces[event.created_entity.surface_index].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" and event.entity.prototype.selectable_in_game then
- game.surfaces[1].destroy_decoratives{area=event.entity.selection_box}
+ game.surfaces[event.entity.surface_index].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" and event.entity.prototype.selectable_in_game then
- game.surfaces[1].destroy_decoratives{area=event.entity.selection_box}
+ game.surfaces[event.entity.surface_index].destroy_decoratives{area=event.entity.selection_box}
end
end)
{
"name": "RealisticDecorationCleanup",
- "version": "1.1.2",
+ "version": "1.1.3",
"title": "Realistic Decoration Cleanup",
"author": "someone1337",
"homepage": "https://git.somenet.org/factorio/RealisticDecorationCleanup.git",