mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 22:06:05 -04:00
Normalized resource reveal notification
This commit is contained in:
parent
3d3b2cd3fc
commit
55b2da6d75
@ -40,21 +40,20 @@
|
|||||||
Polish:"Twoje imperium weszło w Złoty Wiek!"
|
Polish:"Twoje imperium weszło w Złoty Wiek!"
|
||||||
}
|
}
|
||||||
|
|
||||||
"revealed near":{ // As in "Coal revealed near London"
|
"[resourceName] revealed near [cityName]":{ // As in "Coal revealed near London"
|
||||||
Italian:"scoperto vicino a"
|
Italian:"[resourceName] scoperto vicino a [cityName]",
|
||||||
Russian:"обнаружен вблизи "
|
Russian:"[resourceName] обнаружен вблизи [cityName]",
|
||||||
French:"est dévoilé près de"
|
French:"[resourceName] est dévoilé près de [cityName]",
|
||||||
Romanian:"dezvăluit lângă"
|
Romanian:"[resourceName] dezvăluit lângă [cityName]",
|
||||||
German:"gefunden in der Nähe von"
|
German:"[resourceName] gefunden in der Nähe von [cityName]",
|
||||||
Dutch:"Ontdekt: in de buurt van"
|
Dutch:"[resourceName] Ontdekt: in de buurt van [cityName]",
|
||||||
Spanish:"descubierto cerca de"
|
Spanish:"[resourceName] descubierto cerca de [cityName]",
|
||||||
Simplified_Chinese:"被发现在",
|
Simplified_Chinese:"[resourceName] 被发现在 [cityName]",
|
||||||
Traditional_Chinese:"被發現在",
|
Traditional_Chinese:"[resourceName] 被發現在 [cityName]",
|
||||||
Portuguese:"revelado perto de"
|
Portuguese:"[resourceName] revelado perto de [cityName]",
|
||||||
Japanese:"付近で明らかに",
|
Czech:"[resourceName] objeven(a) poblíž [cityName]",
|
||||||
Czech:" objeven(a) poblíž"
|
Ukrainian:"[resourceName] виявлено біля [cityName]",
|
||||||
Ukrainian:"виявлено біля"
|
Polish:"[resourceName] odkryte nieopodal [cityName]"
|
||||||
Polish:"odkryte nieopodal"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"A [greatPerson] has been born!":{ //Smashfanful sayd: "You should add WHERE the Great Person is born, so it should be "A [greatPerson] is born in [cityName]""
|
"A [greatPerson] has been born!":{ //Smashfanful sayd: "You should add WHERE the Great Person is born, so it should be "A [greatPerson] is born in [cityName]""
|
||||||
|
@ -166,17 +166,15 @@ class TechManager {
|
|||||||
.forEach { civInfo.addNotification("[" + it.name + "] policy branch unlocked!", null, Color.PURPLE) }
|
.forEach { civInfo.addNotification("[" + it.name + "] policy branch unlocked!", null, Color.PURPLE) }
|
||||||
}
|
}
|
||||||
|
|
||||||
val revealedResource = GameBasics.TileResources.values.firstOrNull { techName == it.revealedBy }
|
for(revealedResource in GameBasics.TileResources.values.filter{ techName == it.revealedBy }){
|
||||||
|
|
||||||
if (revealedResource != null) {
|
|
||||||
for (tileInfo in civInfo.gameInfo.tileMap.values
|
for (tileInfo in civInfo.gameInfo.tileMap.values
|
||||||
.filter { it.resource == revealedResource.name && civInfo == it.getOwner() }) {
|
.filter { it.resource == revealedResource.name && civInfo == it.getOwner() }) {
|
||||||
|
|
||||||
val closestCityTile = tileInfo.getTilesInDistance(4)
|
val closestCityTile = tileInfo.getTilesInDistance(4)
|
||||||
.firstOrNull { it.isCityCenter() }
|
.firstOrNull { it.isCityCenter() }
|
||||||
if (closestCityTile != null) {
|
if (closestCityTile != null) {
|
||||||
civInfo.addNotification("{" + revealedResource.name + "} {revealed near} "
|
val text = "[${revealedResource.name}] revealed near [${closestCityTile.getCity()!!.name}]"
|
||||||
+ closestCityTile.getCity()!!.name, tileInfo.position, Color.BLUE) // todo change to [] notation
|
civInfo.addNotification(text, tileInfo.position, Color.BLUE)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user