From c85137aaaf86cf9c7f2261a34b0cbda2e66009cf Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 3 Feb 2021 21:18:38 +0200 Subject: [PATCH] Added "Irremovable" unique to tile improvements --- core/src/com/unciv/logic/map/TileInfo.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/com/unciv/logic/map/TileInfo.kt b/core/src/com/unciv/logic/map/TileInfo.kt index 1ad6bc779f..a2d9707e1f 100644 --- a/core/src/com/unciv/logic/map/TileInfo.kt +++ b/core/src/com/unciv/logic/map/TileInfo.kt @@ -318,6 +318,12 @@ open class TileInfo { isCityCenter() -> false "Cannot be built on bonus resource" in improvement.uniques && resource != null && getTileResource().resourceType == ResourceType.Bonus -> false + + // Road improvements can change on tiles withh irremovable improvements - nothing else can, though. + improvement.name != RoadStatus.Railroad.name && improvement.name != RoadStatus.Railroad.name + && improvement.name != "Remove Road" && improvement.name != "Remove Railroad" + && getTileImprovement().let { it!=null && it.hasUnique("Irremovable") } -> false + // Tiles with no terrains, and no turns to build, are like great improvements - they're placeable improvement.terrainsCanBeBuiltOn.isEmpty() && improvement.turnsToBuild==0 && isLand -> true improvement.terrainsCanBeBuiltOn.contains(topTerrain.name) -> true