Skip to content

Commit

Permalink
Fix per-turn remaking of the atlases (#12882)
Browse files Browse the repository at this point in the history
  • Loading branch information
yairm210 authored Jan 29, 2025
1 parent 06c7444 commit 6c99125
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion core/src/com/unciv/UncivGame.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions core/src/com/unciv/ui/screens/newgamescreen/NewGameScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions docs/Modders/uniques.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""

Expand Down

0 comments on commit 6c99125

Please sign in to comment.