diff --git a/core/src/com/unciv/logic/civilization/managers/TechManager.kt b/core/src/com/unciv/logic/civilization/managers/TechManager.kt index 3d294644b8..3942549fb6 100644 --- a/core/src/com/unciv/logic/civilization/managers/TechManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/TechManager.kt @@ -274,9 +274,10 @@ class TechManager : IsPartOfGameInfoSerialization { city.updateCitizens = true } - civInfo.addNotification("Research of [$techName] has completed!", TechAction(techName), - NotificationCategory.General, - NotificationIcon.Science, techName) + if(!civInfo.isSpectator()) + civInfo.addNotification("Research of [$techName] has completed!", TechAction(techName), + NotificationCategory.General, + NotificationIcon.Science, techName) if (isNewTech) civInfo.popupAlerts.add(PopupAlert(AlertType.TechResearched, techName)) @@ -374,11 +375,12 @@ class TechManager : IsPartOfGameInfoSerialization { updateEra() val currentEra = civInfo.getEra() if (previousEra != currentEra) { - civInfo.addNotification( - "You have entered the [$currentEra]!", - NotificationCategory.General, - NotificationIcon.Science - ) + if(!civInfo.isSpectator()) + civInfo.addNotification( + "You have entered the [$currentEra]!", + NotificationCategory.General, + NotificationIcon.Science + ) if (civInfo.isMajorCiv()) { for (knownCiv in civInfo.getKnownCivs()) { knownCiv.addNotification( @@ -390,11 +392,12 @@ class TechManager : IsPartOfGameInfoSerialization { for (policyBranch in getRuleset().policyBranches.values.filter { it.era == currentEra.name && civInfo.policies.isAdoptable(it) }) { - civInfo.addNotification( - "[${policyBranch.name}] policy branch unlocked!", - NotificationCategory.General, - NotificationIcon.Culture - ) + if(!civInfo.isSpectator()) + civInfo.addNotification( + "[${policyBranch.name}] policy branch unlocked!", + NotificationCategory.General, + NotificationIcon.Culture + ) } val erasPassed = getRuleset().eras.values diff --git a/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt b/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt index e8b6acb47b..96c288029d 100644 --- a/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt +++ b/core/src/com/unciv/logic/civilization/transients/CivInfoTransientCache.kt @@ -98,11 +98,12 @@ class CivInfoTransientCache(val civInfo: Civilization) { val metCiv = entry.key if (metCiv == civInfo || metCiv.isBarbarian() || civInfo.diplomacy.containsKey(metCiv.civName)) continue civInfo.diplomacyFunctions.makeCivilizationsMeet(metCiv) - civInfo.addNotification("We have encountered [${metCiv.civName}]!", - entry.value.position, - NotificationCategory.Diplomacy, metCiv.civName, - NotificationIcon.Diplomacy - ) + if(!civInfo.isSpectator()) + civInfo.addNotification("We have encountered [${metCiv.civName}]!", + entry.value.position, + NotificationCategory.Diplomacy, metCiv.civName, + NotificationIcon.Diplomacy + ) metCiv.addNotification("We have encountered [${civInfo.civName}]!", entry.value.position, NotificationCategory.Diplomacy, civInfo.civName, @@ -189,8 +190,9 @@ class CivInfoTransientCache(val civInfo: Civilization) { if (civInfo.naturalWonders.contains(tile.naturalWonder)) continue civInfo.naturalWonders.add(tile.naturalWonder!!) - civInfo.addNotification("We have discovered [${tile.naturalWonder}]!", - tile.position, NotificationCategory.General, "StatIcons/Happiness") + if(!civInfo.isSpectator()) + civInfo.addNotification("We have discovered [${tile.naturalWonder}]!", + tile.position, NotificationCategory.General, "StatIcons/Happiness") var goldGained = 0 val discoveredNaturalWonders = civInfo.gameInfo.civilizations.filter { it != civInfo && it.isMajorCiv() }