mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
fix: loading a game would load the oldest backup save
This commit is contained in:
@@ -109,6 +109,14 @@ class UIWorldPortal : UICanvas(
|
||||
}
|
||||
}
|
||||
|
||||
private fun cleanUpWorldDict() {
|
||||
// remove dupes, etc
|
||||
INGAME.actorNowPlaying?.let {
|
||||
val avList = (it.actorValue.getAsString(AVKey.WORLD_PORTAL_DICT) ?: "").split(',').filter { it.isNotBlank() }.toSet()
|
||||
it.actorValue[AVKey.WORLD_PORTAL_DICT] = avList.joinToString(",")
|
||||
}
|
||||
}
|
||||
|
||||
override fun show() {
|
||||
super.show()
|
||||
transitionPanel.forcePosition(0)
|
||||
@@ -117,6 +125,7 @@ class UIWorldPortal : UICanvas(
|
||||
|
||||
// add current world to the player's worldportaldict
|
||||
addWorldToPlayersDict(INGAME.world.worldIndex)
|
||||
cleanUpWorldDict()
|
||||
}
|
||||
|
||||
override fun hide() {
|
||||
|
||||
Reference in New Issue
Block a user