From 3bbb3a016c09c064e414cd6990f84751fd7f93ca Mon Sep 17 00:00:00 2001 From: Gualdimar Date: Tue, 14 Mar 2023 20:41:42 +0200 Subject: [PATCH] Double trades fix + Diplomacy screen layout fix (#8896) --- .../unciv/logic/automation/civilization/NextTurnAutomation.kt | 2 +- .../src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt b/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt index 0806e106ce..0aa94bfdf9 100644 --- a/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt +++ b/core/src/com/unciv/logic/automation/civilization/NextTurnAutomation.kt @@ -653,7 +653,7 @@ object NextTurnAutomation { }) { val relationshipLevel = civInfo.getDiplomacyManager(otherCiv).relationshipLevel() - if (relationshipLevel <= RelationshipLevel.Enemy) + if (relationshipLevel <= RelationshipLevel.Enemy || otherCiv.tradeRequests.any { it.requestingCiv == civInfo.civName }) continue val trades = potentialLuxuryTrades(civInfo, otherCiv) diff --git a/core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt b/core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt index 395ab45c24..eb62db108b 100644 --- a/core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/screens/diplomacyscreen/DiplomacyScreen.kt @@ -949,7 +949,7 @@ class DiplomacyScreen( * _Caller is responsible to not exceed this **including its own padding**_ */ // Note breaking the rule above will squeeze the leftSideScroll to the left - cumulatively. - internal fun getTradeColumnsWidth() = (stage.width - leftSideScroll.width - 3f) / 2 // 3 for SplitPane handle + internal fun getTradeColumnsWidth() = (stage.width * 0.8f - 3f) / 2 // 3 for SplitPane handle override fun resize(width: Int, height: Int) { super.resize(width, height)