diff --git a/changelog.txt b/changelog.txt index e69543b7..fdbeadff 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.2.2 +Date: 08. 11. 2023 + Bugfixes: + - Fix an issue where the game would crash when upgrading a house for the first time. +--------------------------------------------------------------------------------------------------- Version: 0.2.1 Date: 07. 11. 2023 Bugfixes: diff --git a/city.lua b/city.lua index c000dfe4..605fa7ea 100644 --- a/city.lua +++ b/city.lua @@ -1282,8 +1282,10 @@ local function findUpgradableCells(city, limit, upgradeTo) end local function clearCell(city, upgradeCell) - if global.tycoon_house_lights[upgradeCell.cell.entity.unit_number] then - global.tycoon_house_lights[upgradeCell.cell.entity.unit_number].destroy() + if global.tycoon_house_lights ~= nil then + if global.tycoon_house_lights[upgradeCell.cell.entity.unit_number] then + global.tycoon_house_lights[upgradeCell.cell.entity.unit_number].destroy() + end end upgradeCell.cell.entity.destroy() -- We need to clear the cell as well, so that the construction has available space diff --git a/graphics/entity/apple-farm/apple-farm.png b/graphics/entity/apple-farm/apple-farm.png index b96313cd..e23e13c1 100644 Binary files a/graphics/entity/apple-farm/apple-farm.png and b/graphics/entity/apple-farm/apple-farm.png differ diff --git a/prototypes/entities/apple-farm.lua b/prototypes/entities/apple-farm.lua index aa84dd10..207add37 100644 --- a/prototypes/entities/apple-farm.lua +++ b/prototypes/entities/apple-farm.lua @@ -30,7 +30,7 @@ data:extend{ priority = "high", width = 500, height = 500, - shift = {0, 0}, + shift = {0, -0.5}, scale = 1 } },