Merge pull request #366 from ninjatao/diplomacy_stats

Mark defeated civs in diplomacy screen.
This commit is contained in:
yairm210 2018-12-21 11:17:30 +02:00 committed by GitHub
commit e24c50f1b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -294,11 +294,12 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
val label = Label(civ.civName.tr(), CameraStageBaseScreen.skin)
if(playerKnows(civ)) {
if (civ.isDefeated()) {
civGroup.background = civGroupBackground.tint(Color.LIGHT_GRAY)
} else if (playerKnows(civ)) {
civGroup.background = civGroupBackground.tint(civ.getNation().getColor())
label.setFontColor(civ.getNation().getSecondaryColor())
}
else {
} else {
civGroup.background = civGroupBackground.tint(Color.DARK_GRAY)
label.setText("???")
}
@ -315,8 +316,8 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
}
for(civ in relevantCivs.filter { playerKnows(it) })
for(diplomacy in civ.diplomacy.values.filter { !it.otherCiv().isBarbarianCivilization() && playerKnows(it.otherCiv()) }){
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()}){
val civGroup = civGroups[civ]!!
val otherCivGroup = civGroups[diplomacy.otherCiv()]!!