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

View File

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