From d8b067553d663861fde2957d35836774f9436b62 Mon Sep 17 00:00:00 2001 From: jodokus31 <33641866+jodokus31@users.noreply.github.com> Date: Wed, 27 Dec 2023 16:45:02 +0100 Subject: [PATCH 1/2] Bugfixes regarding upgrading --- control.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/control.lua b/control.lua index 921c21d..d12da16 100644 --- a/control.lua +++ b/control.lua @@ -403,7 +403,7 @@ local function try_upgrade_single_entity(entity, target_name, player) -- same entity name: f.e. upgrade belt to belt local direction = entity.get_upgrade_direction() -- simply change direction - if entity.direction ~= direction then + if direction and entity.direction and entity.direction ~= direction then entity.direction = direction entity.cancel_upgrade(player.force, player) return SUCCESS_DONE_ALL @@ -462,9 +462,7 @@ local function try_upgrade(entity, player, state) local target_name = target_prototype.name if entity.type == "underground-belt" and entity.neighbours then - return try_upgrade_paired_entity(entity, entity.neighbours, target_name, player, true) - elseif entity.type == "pipe-to-ground" and entity.neighbours[1] and entity.neighbours[1][1] then - return try_upgrade_paired_entity(entity, entity.neighbours[1][1], target_name, player, false) + return try_upgrade_paired_entity(entity, entity.neighbours, target_name, player, true) else return try_upgrade_single_entity(entity, target_name, player) end From 0a52878d804d670bb14923d88b90e0199e1d2e7a Mon Sep 17 00:00:00 2001 From: jodokus31 <33641866+jodokus31@users.noreply.github.com> Date: Wed, 27 Dec 2023 16:49:10 +0100 Subject: [PATCH 2/2] Update version and changelog --- changelog.txt | 6 ++++++ info.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 21f9d9d..8503478 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,10 @@ --------------------------------------------------------------------------------------------------- +Version: 0.5.9 +Date: 2023-12-27 + Bugfixes: + - Fix bug, when upgrading underground pipes. + - Try to fix bug, when upgrading only the direction of entities. Not repro for me, but I added some additional nil checks +--------------------------------------------------------------------------------------------------- Version: 0.5.8 Date: 2023-07-16 Changes: diff --git a/info.json b/info.json index 85b4abe..422c347 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "autobuild", - "version": "0.5.8", + "version": "0.5.9", "factorio_version": "1.1", "title": "Autobuild", "author": "Therax",