mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 06:51:30 -04:00
Fix crash from diplomacy screen.
This commit is contained in:
parent
c37983667c
commit
91baeddde2
@ -327,9 +327,11 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(civ in relevantCivs.filter { playerKnows(it) && !it.isDefeated() })
|
for(civ in relevantCivs.filter { playerKnows(it) && !it.isDefeated() })
|
||||||
for(diplomacy in civ.diplomacy.values.filter { !it.otherCiv().isBarbarianCivilization() && playerKnows(it.otherCiv()) && !it.otherCiv().isDefeated()}){
|
for(diplomacy in civ.diplomacy.values.
|
||||||
|
filter { !it.otherCiv().isBarbarianCivilization() && !it.otherCiv().isCityState()
|
||||||
|
&& playerKnows(it.otherCiv()) && !it.otherCiv().isDefeated()}){
|
||||||
val civGroup = civGroups[civ.civName]!!
|
val civGroup = civGroups[civ.civName]!!
|
||||||
val otherCivGroup = civGroups[diplomacy.otherCivName]!!
|
val otherCivGroup = civGroups[diplomacy.otherCivName]!! //
|
||||||
|
|
||||||
val statusLine = ImageGetter.getLine(civGroup.x+civGroup.width/2,civGroup.y+civGroup.height/2,
|
val statusLine = ImageGetter.getLine(civGroup.x+civGroup.width/2,civGroup.y+civGroup.height/2,
|
||||||
otherCivGroup.x+otherCivGroup.width/2,otherCivGroup.y+otherCivGroup.height/2,3f)
|
otherCivGroup.x+otherCivGroup.width/2,otherCivGroup.y+otherCivGroup.height/2,3f)
|
||||||
|
@ -92,7 +92,7 @@ class DiplomacyScreen:CameraStageBaseScreen() {
|
|||||||
val diplomacyTable = Table()
|
val diplomacyTable = Table()
|
||||||
diplomacyTable.defaults().pad(10f)
|
diplomacyTable.defaults().pad(10f)
|
||||||
if (otherCiv.isCityState()) {
|
if (otherCiv.isCityState()) {
|
||||||
diplomacyTable.add(otherCiv.getNation().getLeaderDisplayName().toLabel())
|
diplomacyTable.add(otherCiv.getNation().getLeaderDisplayName().toLabel()).row()
|
||||||
diplomacyTable.add(("Type : " + otherCiv.getCityStateType().toString()).toLabel()).row()
|
diplomacyTable.add(("Type : " + otherCiv.getCityStateType().toString()).toLabel()).row()
|
||||||
diplomacyTable.add(("Influence : " + otherCiv.getDiplomacyManager(currentPlayerCiv).influence.toInt().toString()).toLabel()).row()
|
diplomacyTable.add(("Influence : " + otherCiv.getDiplomacyManager(currentPlayerCiv).influence.toInt().toString()).toLabel()).row()
|
||||||
if (otherCiv.getDiplomacyManager(currentPlayerCiv).influence >= 60) {
|
if (otherCiv.getDiplomacyManager(currentPlayerCiv).influence >= 60) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user