From 6d851b27d0d915a1debe42098e15fc33f38bee2b Mon Sep 17 00:00:00 2001 From: npc-strider Date: Mon, 15 Apr 2019 15:29:23 +0800 Subject: [PATCH] 0.7.3: Remove hidden flag from artillery ENTITY (was causing issues with the toggling tool) --- Shortcuts/changelog.txt | 6 ++++++ Shortcuts/data-updates.lua | 13 +++++++------ Shortcuts/info.json | 2 +- Shortcuts/shortcuts.lua | 5 ++++- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/Shortcuts/changelog.txt b/Shortcuts/changelog.txt index 0673c07..2ea95c0 100644 --- a/Shortcuts/changelog.txt +++ b/Shortcuts/changelog.txt @@ -1,3 +1,9 @@ +--------------------------------------------------------------------------------------------------- +Version: 0.7.3 +Date: 2019-04-15 + Bugfixes: + - Made artillery toggle functional again (Removed hidden flag from disabled artillery ENTITY which was preventing the planner from switching it back to normal) + --------------------------------------------------------------------------------------------------- Version: 0.7.2 Date: 2019-04-15 diff --git a/Shortcuts/data-updates.lua b/Shortcuts/data-updates.lua index ae5f3f6..e5a6ac3 100644 --- a/Shortcuts/data-updates.lua +++ b/Shortcuts/data-updates.lua @@ -148,12 +148,13 @@ data:extend({ } }) -local disabled_turret = {} -local disabled_turret_item = {} -local disabled_gun = {} -local disable_turret_list = {} - if settings.startup["artillery-jammer-remote"].value == true then + + local disabled_turret = {} + local disabled_turret_item = {} + local disabled_gun = {} + local disable_turret_list = {} + if settings.startup["artillery-toggle"].value == "both" then disable_turret_list = {"artillery-wagon", "artillery-turret",} elseif settings.startup["artillery-toggle"].value == "artillery-wagon" then @@ -179,7 +180,7 @@ if settings.startup["artillery-jammer-remote"].value == true then disabled_turret_item[i].place_result = "disabled-" .. name disabled_turret_item[i].flags = {"hidden"} disabled_turret[i].name = "disabled-" .. name - disabled_turret[i].flags = {"hidden"} + -- disabled_turret[i].flags = {"hidden"} Turns out flagging an entity (Not ITEM!) as hidden makes it immune to selection-tools... disabled_turret[i].localised_name = {"", {"entity-name." .. entity.name}, " (", {"gui-constant.off"}, ")"} disabled_gun[i] = util.table.deepcopy(data.raw["gun"][gun]) disabled_gun[i].name = "disabled-" .. gun diff --git a/Shortcuts/info.json b/Shortcuts/info.json index 6c32e8f..a633f48 100644 --- a/Shortcuts/info.json +++ b/Shortcuts/info.json @@ -1,6 +1,6 @@ { "name": "Shortcuts", - "version": "0.7.2", + "version": "0.7.3", "factorio_version": "0.17", "title": "Shortcuts", "author": "npc_strider(morley376)", diff --git a/Shortcuts/shortcuts.lua b/Shortcuts/shortcuts.lua index 4163286..d7fb916 100644 --- a/Shortcuts/shortcuts.lua +++ b/Shortcuts/shortcuts.lua @@ -126,14 +126,17 @@ if settings.startup["rail-block-visualization-toggle"].value == true then end if settings.startup["artillery-jammer-remote"].value == true then + local disable_turret_list = {} + if settings.startup["artillery-toggle"].value == "both" then - disable_turret_list = {"artillery-wagon", "artillery-turret",} + disable_turret_list = {"artillery-wagon", "artillery-turret"} elseif settings.startup["artillery-toggle"].value == "artillery-wagon" then disable_turret_list = {"artillery-wagon"} elseif settings.startup["artillery-toggle"].value == "artillery-turret" then disable_turret_list = {"artillery-turret"} end + data:extend( { {