mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
Revert "Global politics overview table includes current civ"
This reverts commit cfc292eb0ab937f43ed40946cac816fee019b069.
This commit is contained in:
parent
6c8754adbd
commit
42041647f8
@ -16,10 +16,10 @@ import com.unciv.models.translations.tr
|
||||
class DiplomacyFunctions(val civInfo: Civilization){
|
||||
|
||||
/** A sorted Sequence of all other civs we know (excluding barbarians and spectators) */
|
||||
fun getKnownCivsSorted(includeSelf:Boolean, includeCityStates: Boolean = true, includeDefeated: Boolean = false) =
|
||||
fun getKnownCivsSorted(includeCityStates: Boolean = true, includeDefeated: Boolean = false) =
|
||||
civInfo.gameInfo.civilizations.asSequence()
|
||||
.filterNot {
|
||||
(!includeSelf && it == civInfo) ||
|
||||
it == civInfo ||
|
||||
it.isBarbarian() ||
|
||||
it.isSpectator() ||
|
||||
!civInfo.knows(it) ||
|
||||
|
@ -112,7 +112,7 @@ class DiplomacyScreen(
|
||||
|
||||
var selectCivY = 0f
|
||||
|
||||
for (civ in viewingCiv.diplomacyFunctions.getKnownCivsSorted(includeSelf = false)) {
|
||||
for (civ in viewingCiv.diplomacyFunctions.getKnownCivsSorted()) {
|
||||
if (civ == selectCiv) {
|
||||
selectCivY = leftSideTable.prefHeight
|
||||
}
|
||||
|
@ -24,9 +24,9 @@ import com.unciv.ui.components.extensions.addBorder
|
||||
import com.unciv.ui.components.extensions.addSeparator
|
||||
import com.unciv.ui.components.extensions.addSeparatorVertical
|
||||
import com.unciv.ui.components.extensions.center
|
||||
import com.unciv.ui.components.input.onClick
|
||||
import com.unciv.ui.components.extensions.toLabel
|
||||
import com.unciv.ui.components.extensions.toTextButton
|
||||
import com.unciv.ui.components.input.onClick
|
||||
import com.unciv.ui.images.ImageGetter
|
||||
import com.unciv.ui.screens.basescreen.BaseScreen
|
||||
import com.unciv.ui.screens.diplomacyscreen.DiplomacyScreen
|
||||
@ -94,7 +94,7 @@ class GlobalPoliticsOverviewTable (
|
||||
}
|
||||
|
||||
private fun createGlobalPoliticsTable() {
|
||||
for (civ in viewingPlayer.diplomacyFunctions.getKnownCivsSorted(includeSelf = true, includeCityStates = false)) {
|
||||
for (civ in viewingPlayer.diplomacyFunctions.getKnownCivsSorted(includeCityStates = false)) {
|
||||
addSeparator(Color.GRAY)
|
||||
|
||||
// civ image
|
||||
@ -249,8 +249,9 @@ class GlobalPoliticsOverviewTable (
|
||||
else gameInfo.civilizations.count {
|
||||
!it.isSpectator() && !it.isBarbarian() && (persistableData.includeCityStates || !it.isCityState())
|
||||
}.toString()
|
||||
undefeatedCivs = viewingPlayer.diplomacyFunctions.getKnownCivsSorted(includeSelf = true, persistableData.includeCityStates)
|
||||
defeatedCivs = viewingPlayer.diplomacyFunctions.getKnownCivsSorted(includeSelf = true, persistableData.includeCityStates, true)
|
||||
undefeatedCivs = sequenceOf(viewingPlayer) +
|
||||
viewingPlayer.diplomacyFunctions.getKnownCivsSorted(persistableData.includeCityStates)
|
||||
defeatedCivs = viewingPlayer.diplomacyFunctions.getKnownCivsSorted(persistableData.includeCityStates, true)
|
||||
.filter { it.isDefeated() }
|
||||
|
||||
clear()
|
||||
|
Loading…
x
Reference in New Issue
Block a user