mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-23 11:34:54 -04:00
Fixed Gold being translated in trade offer with peace treaty
This commit is contained in:
parent
acb7e8157c
commit
db60d83424
@ -18,7 +18,6 @@ import com.unciv.logic.trade.TradeRequest
|
|||||||
import com.unciv.logic.trade.TradeOfferType
|
import com.unciv.logic.trade.TradeOfferType
|
||||||
import com.unciv.models.ruleset.nation.PersonalityValue
|
import com.unciv.models.ruleset.nation.PersonalityValue
|
||||||
import com.unciv.models.ruleset.unique.UniqueType
|
import com.unciv.models.ruleset.unique.UniqueType
|
||||||
import com.unciv.models.translations.tr
|
|
||||||
import com.unciv.ui.screens.victoryscreen.RankingType
|
import com.unciv.ui.screens.victoryscreen.RankingType
|
||||||
import kotlin.math.abs
|
import kotlin.math.abs
|
||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
@ -336,13 +335,13 @@ object DiplomacyAutomation {
|
|||||||
moneyWeNeedToPay = civInfo.gold // As much as possible
|
moneyWeNeedToPay = civInfo.gold // As much as possible
|
||||||
}
|
}
|
||||||
tradeLogic.currentTrade.ourOffers.add(
|
tradeLogic.currentTrade.ourOffers.add(
|
||||||
TradeOffer("Gold".tr(), TradeOfferType.Gold, moneyWeNeedToPay, civInfo.gameInfo.speed)
|
TradeOffer("Gold", TradeOfferType.Gold, moneyWeNeedToPay, civInfo.gameInfo.speed)
|
||||||
)
|
)
|
||||||
} else if (moneyWeNeedToPay < -100) {
|
} else if (moneyWeNeedToPay < -100) {
|
||||||
val moneyTheyNeedToPay = abs(moneyWeNeedToPay).coerceAtMost(enemy.gold)
|
val moneyTheyNeedToPay = abs(moneyWeNeedToPay).coerceAtMost(enemy.gold)
|
||||||
if (moneyTheyNeedToPay > 0) {
|
if (moneyTheyNeedToPay > 0) {
|
||||||
tradeLogic.currentTrade.theirOffers.add(
|
tradeLogic.currentTrade.theirOffers.add(
|
||||||
TradeOffer("Gold".tr(), TradeOfferType.Gold, moneyTheyNeedToPay, civInfo.gameInfo.speed)
|
TradeOffer("Gold", TradeOfferType.Gold, moneyTheyNeedToPay, civInfo.gameInfo.speed)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user