mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-25 12:54:06 -04:00
Do not display "war against" quest to the civ that the war is against
Do not allow liberating city-states you were at war with
This commit is contained in:
parent
c4364e3a8f
commit
69d4772f0d
@ -193,7 +193,7 @@ class CityInfoConquestFunctions(val city: CityInfo){
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
val foundingCiv = civInfo.gameInfo.civilizations.first { it.civName == foundingCiv }
|
val foundingCiv = civInfo.gameInfo.getCivilization(foundingCiv)
|
||||||
if (foundingCiv.isDefeated()) // resurrected civ
|
if (foundingCiv.isDefeated()) // resurrected civ
|
||||||
for (diploManager in foundingCiv.diplomacy.values)
|
for (diploManager in foundingCiv.diplomacy.values)
|
||||||
if (diploManager.diplomaticStatus == DiplomaticStatus.War)
|
if (diploManager.diplomaticStatus == DiplomaticStatus.War)
|
||||||
|
@ -343,7 +343,7 @@ class DiplomacyScreen(
|
|||||||
diplomacyTable.add(getQuestTable(assignedQuest)).row()
|
diplomacyTable.add(getQuestTable(assignedQuest)).row()
|
||||||
}
|
}
|
||||||
|
|
||||||
for (target in otherCiv.getKnownCivs().filter { otherCiv.questManager.warWithMajorActive(it) }) {
|
for (target in otherCiv.getKnownCivs().filter { otherCiv.questManager.warWithMajorActive(it) && viewingCiv != it }) {
|
||||||
diplomacyTable.addSeparator()
|
diplomacyTable.addSeparator()
|
||||||
diplomacyTable.add(getWarWithMajorTable(target, otherCiv)).row()
|
diplomacyTable.add(getWarWithMajorTable(target, otherCiv)).row()
|
||||||
}
|
}
|
||||||
|
@ -153,12 +153,14 @@ class AlertPopup(val worldScreen: WorldScreen, val popupAlert: PopupAlert): Popu
|
|||||||
addQuestionAboutTheCity(city.name)
|
addQuestionAboutTheCity(city.name)
|
||||||
val conqueringCiv = worldScreen.gameInfo.getCurrentPlayerCivilization()
|
val conqueringCiv = worldScreen.gameInfo.getCurrentPlayerCivilization()
|
||||||
|
|
||||||
addLiberateOption(city.foundingCiv) {
|
if (!conqueringCiv.isAtWarWith(worldScreen.gameInfo.getCivilization(city.foundingCiv))) {
|
||||||
city.liberateCity(conqueringCiv)
|
addLiberateOption(city.foundingCiv) {
|
||||||
worldScreen.shouldUpdate = true
|
city.liberateCity(conqueringCiv)
|
||||||
close()
|
worldScreen.shouldUpdate = true
|
||||||
|
close()
|
||||||
|
}
|
||||||
|
addSeparator()
|
||||||
}
|
}
|
||||||
addSeparator()
|
|
||||||
add(getCloseButton("Keep it")).row()
|
add(getCloseButton("Keep it")).row()
|
||||||
}
|
}
|
||||||
AlertType.BorderConflict -> {
|
AlertType.BorderConflict -> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user