diff --git a/android/assets/jsons/Civ V - Vanilla/Buildings.json b/android/assets/jsons/Civ V - Vanilla/Buildings.json index 3aa16f3845..0fff03ded6 100644 --- a/android/assets/jsons/Civ V - Vanilla/Buildings.json +++ b/android/assets/jsons/Civ V - Vanilla/Buildings.json @@ -937,7 +937,7 @@ { "name": "Manhattan Project", "isNationalWonder": true, - "uniques": ["Enables nuclear weapon"], + "uniques": ["Enables nuclear weapon", "Triggers a global alert upon completion"], "requiredTech": "Nuclear Fission" }, { @@ -1014,13 +1014,13 @@ "name": "SS Booster", "requiredResource": "Aluminum", "requiredTech": "Robotics", - "uniques": ["Spaceship part", "Cannot be purchased"] + "uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased"] }, { "name": "Apollo Program", "cost": 1500, "isNationalWonder": true, - "uniques": ["Enables construction of Spaceship parts"], + "uniques": ["Enables construction of Spaceship parts", "Triggers a global alert upon completion"], "requiredTech": "Rocketry" }, @@ -1044,18 +1044,18 @@ "name": "SS Cockpit", "requiredResource": "Aluminum", "requiredTech": "Satellites", - "uniques": ["Spaceship part", "Cannot be purchased"] + "uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased"] }, { "name": "SS Engine", "requiredResource": "Aluminum", "requiredTech": "Particle Physics", - "uniques": ["Spaceship part", "Cannot be purchased"] + "uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased"] }, { "name": "SS Stasis Chamber", "requiredResource": "Aluminum", "requiredTech": "Nanotechnology", - "uniques": ["Spaceship part", "Cannot be purchased"] + "uniques": ["Spaceship part", "Triggers a global alert upon completion", "Cannot be purchased"] } ] diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 0be55ba60c..79a02d55fb 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -395,6 +395,8 @@ Cannot provide unit upkeep for [unitName] - unit has been disbanded! = [cityName] is starving! = [construction] has been built in [cityName] = [wonder] has been built in a faraway land = +[civName] has completed [construction]! = +An unknown civilization has completed [construction]! = Work has started on [construction] = [cityName] cannot continue work on [construction] = [cityName] has expanded its borders! = diff --git a/core/src/com/unciv/logic/city/CityConstructions.kt b/core/src/com/unciv/logic/city/CityConstructions.kt index e493fc9eb9..1d0c09d28c 100644 --- a/core/src/com/unciv/logic/city/CityConstructions.kt +++ b/core/src/com/unciv/logic/city/CityConstructions.kt @@ -347,7 +347,16 @@ class CityConstructions { cityInfo.civInfo.addNotification("[${construction.name}] has been built in [" + cityInfo.name + "]", cityInfo.location, NotificationIcon.Construction, icon) } - + if (construction is Building && "Triggers a global alert upon completion" in construction.uniques) { + for (otherCiv in cityInfo.civInfo.gameInfo.civilizations) { + // No need to notify ourself, since we already got the building notification anyway + if (otherCiv == cityInfo.civInfo) continue + val completingCivDescription = + if (otherCiv.knows(cityInfo.civInfo)) "[${cityInfo.civInfo.civName}]" else "An unknown civilization" + otherCiv.addNotification("$completingCivDescription has completed [${construction.name}]!", + NotificationIcon.Construction, buildingIcon) + } + } } fun addBuilding(buildingName: String) { diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 6331e14713..9f1854483e 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -413,8 +413,8 @@ class Building : NamedStats(), IConstruction { civInfo.victoryManager.currentsSpaceshipParts.add(name, 1) return true } - cityConstructions.addBuilding(name) + cityConstructions.addBuilding(name) val improvement = getImprovement(civInfo.gameInfo.ruleSet) if (improvement != null) {