From 41121f4079ceb63b066e19e155b8c93893ed38ed Mon Sep 17 00:00:00 2001 From: Someone Date: Tue, 2 Jan 2024 00:18:09 +0100 Subject: [PATCH] RELEASE 1.1.3 - fix decoration cleanup on non-nauvis. --- License.txt | 2 +- changelog.txt | 14 ++++++++++++++ control.lua | 8 ++++---- info.json | 2 +- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/License.txt b/License.txt index 6c79670..471d56f 100644 --- a/License.txt +++ b/License.txt @@ -1,4 +1,4 @@ -Copyright (c) 2018-2023 Someone +Copyright (c) 2018-2024 Someone Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/changelog.txt b/changelog.txt index 10f0a74..df5e3b3 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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 diff --git a/control.lua b/control.lua index 6ec133e..091fb88 100644 --- a/control.lua +++ b/control.lua @@ -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) diff --git a/info.json b/info.json index 1719656..5dfa89d 100644 --- 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", -- 2.43.0