marble veins on worldgen

This commit is contained in:
minjaesong
2023-11-15 20:37:52 +09:00
parent b9d2e3e9d9
commit fd385d33a0
8 changed files with 100 additions and 13 deletions

View File

@@ -75,6 +75,8 @@ object UILoadGovernor {
field = value
}*/
var interruptSavegameListGenerator = false
fun reset() {
printdbg(this, "Resetting player and world selection")
// playerDisk = null

View File

@@ -82,6 +82,7 @@ class UILoadList(val full: UILoadSavegame) : UICanvas() {
override fun show() {
if (!showCalled) {
UILoadGovernor.interruptSavegameListGenerator = false
showCalled = true
// println("UILoadList ${this.hashCode()} show called by:")
// printStackTrace(this)
@@ -102,7 +103,10 @@ class UILoadList(val full: UILoadSavegame) : UICanvas() {
// read savegames
var savegamesCount = 0
printdbg(this, "============== ${this.hashCode()} ============== ")
App.sortedPlayers.forEach { uuid ->
for (uuid in App.sortedPlayers) {
if (UILoadGovernor.interruptSavegameListGenerator) break
printdbg(this, "Reading player $uuid")
val x = full.uiX

View File

@@ -196,6 +196,8 @@ class UINewWorld(val remoCon: UIRemoCon) : UICanvas() {
ingame.gameLoadInfoPayload = worldParam
ingame.gameLoadMode = TerrarumIngame.GameLoadMode.CREATE_NEW
UILoadGovernor.interruptSavegameListGenerator = true
Terrarum.setCurrentIngameInstance(ingame)
val loadScreen = FancyWorldgenLoadScreen(ingame, wx, wy)
App.setLoadScreen(loadScreen)
@@ -227,6 +229,7 @@ class UINewWorld(val remoCon: UIRemoCon) : UICanvas() {
ByteArray64Reader(playerDisk.getFile(SAVEGAMEINFO)!!.bytes, Common.CHARSET)
) as IngamePlayer
UILoadGovernor.interruptSavegameListGenerator = true
LoadSavegame(
App.savegamePlayers[player.uuid]!!.files[0],