From 60b374de8d05aff1b8a8af3ee782febdb1ede8e2 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 25 Jun 2024 00:26:52 +0300 Subject: [PATCH] Clean improvement queue from improvements not in ruleset --- core/src/com/unciv/logic/map/tile/Tile.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/com/unciv/logic/map/tile/Tile.kt b/core/src/com/unciv/logic/map/tile/Tile.kt index bb7d987679..ea62b08b7b 100644 --- a/core/src/com/unciv/logic/map/tile/Tile.kt +++ b/core/src/com/unciv/logic/map/tile/Tile.kt @@ -830,6 +830,8 @@ class Tile : IsPartOfGameInfoSerialization, Json.Serializable { resource = null if (improvement != null && improvement !in ruleset.tileImprovements) improvement = null + if (improvementQueue.any { it.improvement !in ruleset.tileImprovements }) + improvementQueue.clear() // Just get rid of everything, all bets are off } /** If the unit isn't in the ruleset we can't even know what type of unit this is! So check each place