]> git.somenet.org - factorio/RealisticDecorationCleanup.git/commitdiff
RELEASE 2.0.0 - Initial compatibility with Factorio 2.0 master
authorSomeone <someone@somenet.org>
Tue, 22 Oct 2024 08:29:50 +0000 (10:29 +0200)
committerSomeone <someone@somenet.org>
Tue, 22 Oct 2024 08:29:50 +0000 (10:29 +0200)
changelog.txt
control.lua
info.json

index df5e3b3ef1cd0c1858f08f9e09daa06ad5b324cb..015e3cc9ef6ff1dad3375754c4b65371e6e1d1f7 100644 (file)
@@ -1,3 +1,10 @@
+---------------------------------------------------------------------------------------------------
+Version: 2.0.0
+Date: 2024-10-21
+
+  Changed:
+    - Initial compatibility with Factorio 2.0
+
 ---------------------------------------------------------------------------------------------------
 Version: 1.1.3
 Date: 2024-01-02
index 091fb8872797b8c94479b77a92b4f9cc4fa2953c..2c2c992c6ba1865874cd2503ec8df00eb6610455 100644 (file)
@@ -1,24 +1,24 @@
---[[get dir of decorations under entities]]
+--[[get rid 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[event.created_entity.surface_index].destroy_decoratives{area=event.created_entity.selection_box}
-       end
+    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}
+    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[event.created_entity.surface_index].destroy_decoratives{area=event.created_entity.selection_box}
-       end
+    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}
+    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}
-       end
+    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}
+    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}
-       end
+    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}
+    end
 end)
index 5dfa89dfbd598eae08a8168efe4dc877e26aa5b4..d6ac9c7a1c712910852daec0afcb4122ff2d4954 100644 (file)
--- a/info.json
+++ b/info.json
@@ -1,10 +1,10 @@
 {
     "name": "RealisticDecorationCleanup",
-    "version": "1.1.3",
+    "version": "2.0.0",
     "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.",
-    "dependencies": ["base>=1.1.0"],
-    "factorio_version": "1.1"
+    "factorio_version": "2.0",
+    "dependencies": ["base>=2.0.0"]
 }