Fix peace popup with city-state.

This commit is contained in:
Duan Tao
2019-05-08 17:21:53 +08:00
committed by Yair Morgenstern
parent 1434ca3f30
commit 06f25b5b5b

View File

@ -121,15 +121,12 @@ class DiplomacyScreen:CameraStageBaseScreen() {
val PeaceButton = TextButton("Negociate Peace".tr(), skin)
PeaceButton.onClick {
YesNoPopupTable("Peace with [${otherCiv.civName}]?".tr(), {
diplomacyManager.makePeace()
val tradeLogic = TradeLogic(currentPlayerCiv, otherCiv)
tradeLogic.currentTrade.ourOffers.add(TradeOffer("Peace Treaty", TradeType.Treaty, 20))
tradeLogic.currentTrade.theirOffers.add(TradeOffer("Peace Treaty", TradeType.Treaty, 20))
tradeLogic.acceptTrade()
updateLeftSideTable()
}, this)
val tradeLogic = TradeLogic(currentPlayerCiv, otherCiv)
tradeLogic.currentTrade.ourOffers.add(TradeOffer("Peace Treaty", TradeType.Treaty, 20))
tradeLogic.currentTrade.theirOffers.add(TradeOffer("Peace Treaty", TradeType.Treaty, 20))
tradeLogic.acceptTrade()
}
diplomacyTable.add(PeaceButton).row()
}