From 3362c2128cfc61e668656dadfb70a6d75cb393e5 Mon Sep 17 00:00:00 2001 From: lyrjie Date: Fri, 31 Jan 2020 15:03:21 +0300 Subject: [PATCH] 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 --- core/src/com/unciv/logic/civilization/TechManager.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/civilization/TechManager.kt b/core/src/com/unciv/logic/civilization/TechManager.kt index 61280e1f1c..ac79445a74 100644 --- a/core/src/com/unciv/logic/civilization/TechManager.kt +++ b/core/src/com/unciv/logic/civilization/TechManager.kt @@ -223,8 +223,14 @@ class TechManager { val currentEra = civInfo.getEra() if (previousEra < currentEra) { civInfo.addNotification("You have entered the [$currentEra era]!", null, Color.GOLD) - civInfo.getKnownCivs().forEach { - it.addNotification("[${civInfo.civName}] has entered the [$currentEra era]!", null, Color.BLUE) + if (civInfo.isMajorCiv()) { + for (knownCiv in civInfo.getKnownCivs()) { + knownCiv.addNotification( + "[${civInfo.civName}] has entered the [$currentEra era]!", + null, + Color.BLUE + ) + } } getRuleset().policyBranches.values.filter { it.era == currentEra } .forEach { civInfo.addNotification("[" + it.name + "] policy branch unlocked!", null, Color.PURPLE) }