Solved some problems with resigning - we have others, specifically - TradeOffer's constructor assumes Unciv.Current.gameInfo... That'll eb a hassle to deal with...

This commit is contained in:
yairm210 2024-04-15 00:53:08 +03:00
parent 273d473e18
commit 102a4e40c2

View File

@ -244,7 +244,7 @@ object Battle {
// CS friendship from killing barbarians
if (defeatedUnit.getCivInfo().isBarbarian() && !defeatedUnit.isCivilian() && civUnit.getCivInfo().isMajorCiv()) {
for (cityState in UncivGame.Current.gameInfo!!.getAliveCityStates()) {
for (cityState in defeatedUnit.getCivInfo().gameInfo.getAliveCityStates()) {
if (civUnit.getCivInfo().knows(cityState) && defeatedUnit.unit.threatensCiv(cityState)) {
cityState.cityStateFunctions.threateningBarbarianKilledBy(civUnit.getCivInfo())
}
@ -252,7 +252,7 @@ object Battle {
}
// CS war with major pseudo-quest
for (cityState in UncivGame.Current.gameInfo!!.getAliveCityStates()) {
for (cityState in defeatedUnit.getCivInfo().gameInfo.getAliveCityStates()) {
cityState.questManager.militaryUnitKilledBy(civUnit.getCivInfo(), defeatedUnit.getCivInfo())
}
}