From 32041d5b4902bb56b1b739eb5a784f9668566649 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 7 May 2023 09:43:13 +0300 Subject: [PATCH] 4.6.9-patch1 --- buildSrc/src/main/kotlin/BuildConfig.kt | 4 ++-- changelog.md | 6 ++++++ core/src/com/unciv/UncivGame.kt | 2 +- core/src/com/unciv/ui/components/Fonts.kt | 8 ++++++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/buildSrc/src/main/kotlin/BuildConfig.kt b/buildSrc/src/main/kotlin/BuildConfig.kt index fed13751a6..1a570bb133 100644 --- a/buildSrc/src/main/kotlin/BuildConfig.kt +++ b/buildSrc/src/main/kotlin/BuildConfig.kt @@ -3,8 +3,8 @@ package com.unciv.build object BuildConfig { const val kotlinVersion = "1.8.0" const val appName = "Unciv" - const val appCodeNumber = 859 - const val appVersion = "4.6.9" + const val appCodeNumber = 860 + const val appVersion = "4.6.9-patch1" const val gdxVersion = "1.11.0" const val roboVMVersion = "2.3.1" diff --git a/changelog.md b/changelog.md index 390fdf2e04..9f817672af 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ ## 4.6.9 +Hide buildings requiring multiple cities in one city challenge + +Show Strategic resources you have by trade even if you have not researched tech for it yet + +Scale down unit overlays on zoom in to allow selecting bombard target above city + Added Policy icons in text Solved AI 'found religion' crash diff --git a/core/src/com/unciv/UncivGame.kt b/core/src/com/unciv/UncivGame.kt index 21d58e556e..25d17bc7e6 100644 --- a/core/src/com/unciv/UncivGame.kt +++ b/core/src/com/unciv/UncivGame.kt @@ -531,7 +531,7 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci companion object { //region AUTOMATICALLY GENERATED VERSION DATA - DO NOT CHANGE THIS REGION, INCLUDING THIS COMMENT - val VERSION = Version("4.6.9", 859) + val VERSION = Version("4.6.9-patch1", 860) //endregion lateinit var Current: UncivGame diff --git a/core/src/com/unciv/ui/components/Fonts.kt b/core/src/com/unciv/ui/components/Fonts.kt index e4582ad228..53f0449b00 100644 --- a/core/src/com/unciv/ui/components/Fonts.kt +++ b/core/src/com/unciv/ui/components/Fonts.kt @@ -197,6 +197,7 @@ object Fonts { lateinit var fontImplementation: FontImplementation lateinit var font: BitmapFont + var oldFont: BitmapFont? = null /** This resets all cached font data in object Fonts. * Do not call from normal code - reset the Skin instead: `BaseScreen.setSkin()` @@ -205,8 +206,11 @@ object Fonts { val settings = GUI.getSettings() fontImplementation.setFontFamily(settings.fontFamilyData, settings.getFontSize()) if (::font.isInitialized) { - (font.data as? NativeBitmapFontData)?.dispose() // See #9325 - // Don't font.dispose() even it it seems obvious -> leaves only black rectangles + // We don't dispose the old font immediately since there may be objects using it. + // Instead, we wait for the *next* time the font is reset - since by then all usages of the old font should not exist either - #9338 + // Don't font.dispose() even it it seems obvious -> leaves only black rectangles - See #9325 + (oldFont?.data as? NativeBitmapFontData)?.dispose() + oldFont = font } font = fontImplementation.getBitmapFont() font.data.markupEnabled = true