From 6c99125ee9fb86b4d5f81c5d653d05c159bdec03 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 29 Jan 2025 19:48:39 +0200 Subject: [PATCH] Fix per-turn remaking of the atlases (#12882) --- core/src/com/unciv/UncivGame.kt | 1 - core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt | 2 ++ docs/Modders/uniques.md | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/UncivGame.kt b/core/src/com/unciv/UncivGame.kt index 5c21db772a9d8..2f899e3378742 100644 --- a/core/src/com/unciv/UncivGame.kt +++ b/core/src/com/unciv/UncivGame.kt @@ -218,7 +218,6 @@ open class UncivGame(val isConsoleMode: Boolean = false) : Game(), PlatformSpeci for (screen in screenStack) screen.dispose() screenStack.clear() - ImageGetter.setNewRuleset(newGameInfo.ruleset) worldScreen = null // This allows the GC to collect our old WorldScreen, otherwise we keep two WorldScreens in memory. Gdx.input.inputProcessor = null // Avoid ANRs while loading val newWorldScreen = WorldScreen(newGameInfo, autoPlay, newGameInfo.getPlayerToViewAs(), worldScreenRestoreState) diff --git a/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt b/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt index cce8b59059f88..a1f830a0bc7cb 100644 --- a/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt +++ b/core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt @@ -2,6 +2,7 @@ package com.unciv.ui.screens.newgamescreen import com.badlogic.gdx.Gdx import com.badlogic.gdx.graphics.Color +import com.badlogic.gdx.scenes.scene2d.ui.Image import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup import com.unciv.Constants import com.unciv.UncivGame @@ -284,6 +285,7 @@ class NewGameScreen( launchOnGLThread { popup.addGoodSizedLabel(Constants.working).row() popup.open() + ImageGetter.setNewRuleset(ruleset) // To build the temp atlases } val newGame:GameInfo diff --git a/docs/Modders/uniques.md b/docs/Modders/uniques.md index e2086e13b4763..304c4cab67cad 100644 --- a/docs/Modders/uniques.md +++ b/docs/Modders/uniques.md @@ -3328,6 +3328,11 @@ Simple unique parameters are explained by mouseover. Complex parameters are expl Applicable to: UnitTriggerCondition +??? example "<upon entering a [tileFilter] tile>" + Example: "<upon entering a [Farm] tile>" + + Applicable to: UnitTriggerCondition + ## UnitActionModifier uniques !!! note ""