mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 14:24:43 -04:00
Fix: notification when city-states advance to a new era (#1813)
* Fix: notification when city-states advance to a new era * Replaced forEach with for, according with code standards
This commit is contained in:
parent
a728da6a2a
commit
3362c2128c
@ -223,8 +223,14 @@ class TechManager {
|
|||||||
val currentEra = civInfo.getEra()
|
val currentEra = civInfo.getEra()
|
||||||
if (previousEra < currentEra) {
|
if (previousEra < currentEra) {
|
||||||
civInfo.addNotification("You have entered the [$currentEra era]!", null, Color.GOLD)
|
civInfo.addNotification("You have entered the [$currentEra era]!", null, Color.GOLD)
|
||||||
civInfo.getKnownCivs().forEach {
|
if (civInfo.isMajorCiv()) {
|
||||||
it.addNotification("[${civInfo.civName}] has entered the [$currentEra era]!", null, Color.BLUE)
|
for (knownCiv in civInfo.getKnownCivs()) {
|
||||||
|
knownCiv.addNotification(
|
||||||
|
"[${civInfo.civName}] has entered the [$currentEra era]!",
|
||||||
|
null,
|
||||||
|
Color.BLUE
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
getRuleset().policyBranches.values.filter { it.era == currentEra }
|
getRuleset().policyBranches.values.filter { it.era == currentEra }
|
||||||
.forEach { civInfo.addNotification("[" + it.name + "] policy branch unlocked!", null, Color.PURPLE) }
|
.forEach { civInfo.addNotification("[" + it.name + "] policy branch unlocked!", null, Color.PURPLE) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user