mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
marble veins on worldgen
This commit is contained in:
@@ -75,6 +75,8 @@ object UILoadGovernor {
|
||||
field = value
|
||||
}*/
|
||||
|
||||
var interruptSavegameListGenerator = false
|
||||
|
||||
fun reset() {
|
||||
printdbg(this, "Resetting player and world selection")
|
||||
// playerDisk = null
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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],
|
||||
|
||||
Reference in New Issue
Block a user