diff --git a/core/src/com/unciv/logic/civilization/Civilization.kt b/core/src/com/unciv/logic/civilization/Civilization.kt index d0ff05c063..7ed6ec8f68 100644 --- a/core/src/com/unciv/logic/civilization/Civilization.kt +++ b/core/src/com/unciv/logic/civilization/Civilization.kt @@ -317,7 +317,7 @@ class Civilization : IsPartOfGameInfoSerialization { /** Returns only undefeated civs, aka the ones we care about */ fun getKnownCivs() = diplomacy.values.map { it.otherCiv() }.filter { !it.isDefeated() } - fun knows(otherCivName: String) = diplomacy.containsKey(otherCivName) + fun knows(otherCivName: String) = (civName == otherCivName || diplomacy.containsKey(otherCivName)) fun knows(otherCiv: Civilization) = knows(otherCiv.civName) fun getCapital() = cities.firstOrNull { it.isCapital() } diff --git a/core/src/com/unciv/ui/overviewscreen/GlobalPoliticsOverviewTable.kt b/core/src/com/unciv/ui/overviewscreen/GlobalPoliticsOverviewTable.kt index 9f58cc102e..b358304eaf 100644 --- a/core/src/com/unciv/ui/overviewscreen/GlobalPoliticsOverviewTable.kt +++ b/core/src/com/unciv/ui/overviewscreen/GlobalPoliticsOverviewTable.kt @@ -168,7 +168,7 @@ class GlobalPoliticsOverviewTable ( } private fun getCivName(otherciv: Civilization): String { - if (viewingPlayer.knows(otherciv) || otherciv.civName != viewingPlayer.civName) { + if (viewingPlayer.knows(otherciv)){ return otherciv.civName } return "an unknown civilization" @@ -179,7 +179,7 @@ class GlobalPoliticsOverviewTable ( // wars for (otherCiv in civ.getKnownCivs()) { - if (!viewingPlayer.knows(otherCiv)) + if (!viewingPlayer.knows(civ)) continue if(civ.isAtWarWith(otherCiv)) { diff --git a/core/src/com/unciv/ui/overviewscreen/ReligionOverviewTable.kt b/core/src/com/unciv/ui/overviewscreen/ReligionOverviewTable.kt index c537e64eb0..1a44beee82 100644 --- a/core/src/com/unciv/ui/overviewscreen/ReligionOverviewTable.kt +++ b/core/src/com/unciv/ui/overviewscreen/ReligionOverviewTable.kt @@ -89,7 +89,7 @@ class ReligionOverviewTab( val existingReligions: List = gameInfo.civilizations.mapNotNull { it.religionManager.religion } for (religion in existingReligions) { val image = if (religion.isPantheon()) { - if (viewingPlayer.knows(religion.foundingCivName) || viewingPlayer.civName == religion.foundingCivName) + if (viewingPlayer.knows(religion.foundingCivName)) ImageGetter.getNationPortrait(religion.getFounder().nation, 60f) else ImageGetter.getRandomNationPortrait(60f) @@ -136,7 +136,7 @@ class ReligionOverviewTab( statsTable.add(religion.getReligionDisplayName().toLabel()).right().row() statsTable.add("Founding Civ:".toLabel()) val foundingCivName = - if (viewingPlayer.knows(religion.foundingCivName) || viewingPlayer.civName == religion.foundingCivName) + if (viewingPlayer.knows(religion.foundingCivName)) religion.foundingCivName else Constants.unknownNationName statsTable.add(foundingCivName.toLabel()).right().row() diff --git a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt index e98f4e677d..1ddacb9e99 100644 --- a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt @@ -217,7 +217,7 @@ class DiplomacyScreen( var ally = otherCiv.getAllyCiv() if (ally != null) { val allyInfluence = otherCiv.getDiplomacyManager(ally).getInfluence().toInt() - if (!viewingCiv.knows(ally) && ally != viewingCiv.civName) + if (!viewingCiv.knows(ally)) ally = "Unknown civilization" diplomacyTable .add("Ally: [$ally] with [$allyInfluence] Influence".toLabel())