mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Added UI to show what cities are holy cities to the player (#5039)
This commit is contained in:
parent
a77e8015e1
commit
9450fac423
@ -1033,11 +1033,13 @@ Follow [belief] =
|
||||
Religions and Beliefs =
|
||||
Majority Religion: [name] =
|
||||
+ [amount] pressure =
|
||||
Holy city of: [religionName] =
|
||||
Pressure =
|
||||
|
||||
# Religion overview screen
|
||||
Religion Name: =
|
||||
Founding Civ: =
|
||||
Holy City: =
|
||||
Cities following this religion: =
|
||||
Click an icon to see the stats of this religion =
|
||||
|
||||
|
@ -101,6 +101,11 @@ class CityStatsTable(val cityScreen: CityScreen): Table() {
|
||||
setPosition(stage.width - CityScreen.posFromEdge, stage.height - CityScreen.posFromEdge, Align.topRight)
|
||||
}
|
||||
) {
|
||||
if (cityInfo.religion.religionThisIsTheHolyCityOf != null) {
|
||||
// I want this to be centered, but `.center()` doesn't seem to do anything,
|
||||
// regardless of where I place it :(
|
||||
it.add("Holy city of: [${cityInfo.religion.religionThisIsTheHolyCityOf!!}]".toLabel()).center().colspan(2).pad(5f).row()
|
||||
}
|
||||
it.add(getReligionsTable()).colspan(2).pad(5f)
|
||||
}
|
||||
|
||||
|
@ -71,15 +71,26 @@ class ReligionOverviewTable(
|
||||
beliefsTable.add(createBeliefDescription(belief)).pad(10f).row()
|
||||
}
|
||||
|
||||
statsTable.add("Religion Name:".tr())
|
||||
statsTable.add(religion.name.tr()).pad(5f).row()
|
||||
statsTable.add("Founding Civ:".tr())
|
||||
statsTable.add("Religion Name:".toLabel())
|
||||
statsTable.add(religion.name.toLabel()).pad(5f).row()
|
||||
statsTable.add("Founding Civ:".toLabel())
|
||||
val foundingCivName =
|
||||
if (viewingPlayer.knows(religion.foundingCivName) || viewingPlayer.civName == religion.foundingCivName)
|
||||
religion.foundingCivName
|
||||
else "???"
|
||||
statsTable.add(foundingCivName.tr()).pad(5f).row()
|
||||
statsTable.add("Cities following this religion:".tr())
|
||||
statsTable.add(foundingCivName.toLabel()).pad(5f).row()
|
||||
if (religion.isMajorReligion()) {
|
||||
val holyCity = gameInfo.getCities().firstOrNull { it.religion.religionThisIsTheHolyCityOf == religion.name }
|
||||
if (holyCity != null) {
|
||||
statsTable.add("Holy City:".toLabel())
|
||||
val cityName =
|
||||
if (viewingPlayer.exploredTiles.contains(holyCity.getCenterTile().position))
|
||||
holyCity.name
|
||||
else "???"
|
||||
statsTable.add(cityName.toLabel()).pad(5f).row()
|
||||
}
|
||||
}
|
||||
statsTable.add("Cities following this religion:".toLabel())
|
||||
statsTable.add(gameInfo.getCivilization(religion.foundingCivName).religionManager.numberOfCitiesFollowingThisReligion().toString()).pad(5f).row()
|
||||
|
||||
val minWidth = min(statsTable.minWidth, beliefsTable.minWidth) + 5f
|
||||
|
Loading…
x
Reference in New Issue
Block a user