Spectators can now see selected civ city-state influence bars (#11029)

This commit is contained in:
Oskar Niesen 2024-01-28 03:06:13 -06:00 committed by GitHub
parent 7efc71bd28
commit d0c2df995d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()
}