]> git.somenet.org - factorio/RealisticDecorationCleanup.git/commitdiff
RELEASE 1.1.3 - fix decoration cleanup on non-nauvis. master
authorSomeone <someone@somenet.org>
Mon, 1 Jan 2024 23:18:09 +0000 (00:18 +0100)
committerSomeone <someone@somenet.org>
Mon, 1 Jan 2024 23:18:09 +0000 (00:18 +0100)
License.txt
changelog.txt
control.lua
info.json

index 6c7967016fc9cbaa59d5555d4841bccc94436882..471d56f8614b9be241f0c135b8baaa60e7eacb40 100644 (file)
@@ -1,4 +1,4 @@
-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
index 10f0a74d55464706164acd07b9325312cdd790b9..df5e3b3ef1cd0c1858f08f9e09daa06ad5b324cb 100644 (file)
@@ -1,3 +1,17 @@
+---------------------------------------------------------------------------------------------------
+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
index 6ec133e01746ecf416745f97d0c6667e8e8864c5..091fb8872797b8c94479b77a92b4f9cc4fa2953c 100644 (file)
@@ -1,24 +1,24 @@
 --[[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)
index 171965655c6718d095a1f435a12d804c3d0ec3dc..5dfa89dfbd598eae08a8168efe4dc877e26aa5b4 100644 (file)
--- a/info.json
+++ b/info.json
@@ -1,6 +1,6 @@
 {
     "name": "RealisticDecorationCleanup",
-    "version": "1.1.2",
+    "version": "1.1.3",
     "title": "Realistic Decoration Cleanup",
     "author": "someone1337",
     "homepage": "https://git.somenet.org/factorio/RealisticDecorationCleanup.git",