From d0c2df995d56a08585b2409d1d1650b5dea0d6d4 Mon Sep 17 00:00:00 2001 From: Oskar Niesen Date: Sun, 28 Jan 2024 03:06:13 -0600 Subject: [PATCH] Spectators can now see selected civ city-state influence bars (#11029) --- core/src/com/unciv/ui/components/tilegroups/CityButton.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/ui/components/tilegroups/CityButton.kt b/core/src/com/unciv/ui/components/tilegroups/CityButton.kt index 3c66a4a1bd..de2c8fc8a1 100644 --- a/core/src/com/unciv/ui/components/tilegroups/CityButton.kt +++ b/core/src/com/unciv/ui/components/tilegroups/CityButton.kt @@ -428,9 +428,10 @@ class CityButton(val city: City, private val tileGroup: TileGroup) : Table(BaseS cityTable = CityTable(city) add(cityTable).row() + val selectedPlayer = GUI.getSelectedPlayer() // If city state - add influence bar - if (city.civ.isCityState() && city.civ.knows(viewingPlayer)) { - val diplomacyManager = city.civ.getDiplomacyManager(viewingPlayer) + if (city.civ.isCityState() && city.civ.knows(selectedPlayer)) { + val diplomacyManager = city.civ.getDiplomacyManager(selectedPlayer) add(InfluenceTable(diplomacyManager.getInfluence(), diplomacyManager.relationshipLevel())).padTop(1f).row() }