From bf4f952485ba1adbe407353c3ea4cb11ecac6486 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Fri, 31 Jul 2020 10:42:59 +0300 Subject: [PATCH] Spaceship parts not shown to user until Apollo Program is built --- core/src/com/unciv/models/ruleset/Building.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 06363f81e9..48ee7cb6c0 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -303,6 +303,11 @@ class Building : NamedStats(), IConstruction{ return "No national wonders for city-states" } + if ("Spaceship part" in uniques) { + if (!civInfo.hasUnique("Enables construction of Spaceship parts")) return "Apollo project not built!" + if (civInfo.victoryManager.unconstructedSpaceshipParts()[name] == 0) return "Don't need to build any more of these!" + } + if (requiredBuilding != null && !construction.containsBuildingOrEquivalent(requiredBuilding!!)) return "Requires a [$requiredBuilding] in this city" if (cannotBeBuiltWith != null && construction.isBuilt(cannotBeBuiltWith!!)) @@ -322,10 +327,6 @@ class Building : NamedStats(), IConstruction{ if (!containsResourceWithImprovement) return "Nearby $requiredNearbyImprovedResources required" } - if ("Spaceship part" in uniques) { - if (!civInfo.hasUnique("Enables construction of Spaceship parts")) return "Apollo project not built!" - if (civInfo.victoryManager.unconstructedSpaceshipParts()[name] == 0) return "Don't need to build any more of these!" - } if (!civInfo.gameInfo.gameParameters.victoryTypes.contains(VictoryType.Scientific) && "Enables construction of Spaceship parts" in uniques)