mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 06:16:37 -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 =
|
Religions and Beliefs =
|
||||||
Majority Religion: [name] =
|
Majority Religion: [name] =
|
||||||
+ [amount] pressure =
|
+ [amount] pressure =
|
||||||
|
Holy city of: [religionName] =
|
||||||
Pressure =
|
Pressure =
|
||||||
|
|
||||||
# Religion overview screen
|
# Religion overview screen
|
||||||
Religion Name: =
|
Religion Name: =
|
||||||
Founding Civ: =
|
Founding Civ: =
|
||||||
|
Holy City: =
|
||||||
Cities following this religion: =
|
Cities following this religion: =
|
||||||
Click an icon to see the stats of 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)
|
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)
|
it.add(getReligionsTable()).colspan(2).pad(5f)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,15 +71,26 @@ class ReligionOverviewTable(
|
|||||||
beliefsTable.add(createBeliefDescription(belief)).pad(10f).row()
|
beliefsTable.add(createBeliefDescription(belief)).pad(10f).row()
|
||||||
}
|
}
|
||||||
|
|
||||||
statsTable.add("Religion Name:".tr())
|
statsTable.add("Religion Name:".toLabel())
|
||||||
statsTable.add(religion.name.tr()).pad(5f).row()
|
statsTable.add(religion.name.toLabel()).pad(5f).row()
|
||||||
statsTable.add("Founding Civ:".tr())
|
statsTable.add("Founding Civ:".toLabel())
|
||||||
val foundingCivName =
|
val foundingCivName =
|
||||||
if (viewingPlayer.knows(religion.foundingCivName) || viewingPlayer.civName == religion.foundingCivName)
|
if (viewingPlayer.knows(religion.foundingCivName) || viewingPlayer.civName == religion.foundingCivName)
|
||||||
religion.foundingCivName
|
religion.foundingCivName
|
||||||
else "???"
|
else "???"
|
||||||
statsTable.add(foundingCivName.tr()).pad(5f).row()
|
statsTable.add(foundingCivName.toLabel()).pad(5f).row()
|
||||||
statsTable.add("Cities following this religion:".tr())
|
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()
|
statsTable.add(gameInfo.getCivilization(religion.foundingCivName).religionManager.numberOfCitiesFollowingThisReligion().toString()).pad(5f).row()
|
||||||
|
|
||||||
val minWidth = min(statsTable.minWidth, beliefsTable.minWidth) + 5f
|
val minWidth = min(statsTable.minWidth, beliefsTable.minWidth) + 5f
|
||||||
|
Loading…
x
Reference in New Issue
Block a user