From c3da760c3b1179877ac4cb2f9adcdeebcf8e508f Mon Sep 17 00:00:00 2001 From: OptimizedForDensity <105244635+OptimizedForDensity@users.noreply.github.com> Date: Tue, 31 Jan 2023 16:08:17 -0500 Subject: [PATCH] Notification log fix (#8509) * Fix ruin notification and broken conditional check * Translate idle production description --- core/src/com/unciv/logic/civilization/managers/RuinsManager.kt | 2 +- core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt | 2 +- .../com/unciv/ui/overviewscreen/NotificationsOverviewTable.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/com/unciv/logic/civilization/managers/RuinsManager.kt b/core/src/com/unciv/logic/civilization/managers/RuinsManager.kt index c3637d6b93..d77b458fd7 100644 --- a/core/src/com/unciv/logic/civilization/managers/RuinsManager.kt +++ b/core/src/com/unciv/logic/civilization/managers/RuinsManager.kt @@ -49,7 +49,7 @@ class RuinsManager : IsPartOfGameInfoSerialization { && (civInfo.civConstructions.boughtItemsWithIncreasingPrice[civInfo.religionManager.getGreatProphetEquivalent()] ?: 0) > 0 ) continue - if (possibleReward.getMatchingUniques(UniqueType.OnlyAvailableWhen) + if (possibleReward.getMatchingUniques(UniqueType.OnlyAvailableWhen, StateForConditionals.IgnoreConditionals) .any { !it.conditionalsApply(StateForConditionals(civInfo, unit=triggeringUnit, tile = triggeringUnit.getTile()) ) }) continue diff --git a/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt b/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt index c6a3c78c59..f5b1e35012 100644 --- a/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt +++ b/core/src/com/unciv/ui/cityscreen/ConstructionInfoTable.kt @@ -82,7 +82,7 @@ class ConstructionInfoTable(val cityScreen: CityScreen): Table() { is BaseUnit -> construction.getDescription(city) is Building -> construction.getDescription(city, true) is PerpetualStatConversion -> construction.description.replace("[rate]", "[${construction.getConversionRate(city)}]").tr() - is PerpetualConstruction -> construction.description + is PerpetualConstruction -> construction.description.tr() else -> "" // Should never happen } diff --git a/core/src/com/unciv/ui/overviewscreen/NotificationsOverviewTable.kt b/core/src/com/unciv/ui/overviewscreen/NotificationsOverviewTable.kt index 38d4d46763..cce24e307a 100644 --- a/core/src/com/unciv/ui/overviewscreen/NotificationsOverviewTable.kt +++ b/core/src/com/unciv/ui/overviewscreen/NotificationsOverviewTable.kt @@ -88,7 +88,7 @@ class NotificationsOverviewTable( for (notification in categoryNotifications) { val notificationTable = Table(BaseScreen.skin) - val labelWidth = maxEntryWidth * notification.icons.size - 10f + val labelWidth = maxEntryWidth - iconSize * notification.icons.size - 10f val label = WrappableLabel(notification.text, labelWidth, Color.BLACK, 20) notificationTable.add(label)