Fixed trades always beng denied because "our proposed trade is no longer relevant"

This commit is contained in:
Yair Morgenstern
2019-11-17 21:16:51 +02:00
parent 7a02019b7c
commit aa4c70f090
5 changed files with 2050 additions and 2043 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 289 B

After

Width:  |  Height:  |  Size: 328 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 857 KiB

BIN
android/assets/game2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

View File

@ -358,8 +358,9 @@ class CivilizationInfo {
for(tradeRequest in tradeRequests.toList()) { // remove trade requests where one of the sides can no longer supply
val offeringCiv = gameInfo.getCivilization(tradeRequest.requestingCiv)
if (offeringCiv.isDefeated() || !TradeEvaluation().isTradeValid(tradeRequest.trade,offeringCiv,this)) {
if (offeringCiv.isDefeated() || !TradeEvaluation().isTradeValid(tradeRequest.trade,this, offeringCiv)) {
tradeRequests.remove(tradeRequest)
// Yes, this is the right direction. I checked.
offeringCiv.addNotification("Our proposed trade is no longer relevant!", Color.GOLD)
}
}