mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
new world via teleporter wip
This commit is contained in:
@@ -105,11 +105,19 @@ class UIInventoryEscMenu(val full: UIInventoryFull) : UICanvas() {
|
||||
full.unlockTransition()
|
||||
}
|
||||
|
||||
val saveTime_t = App.getTIME_T()
|
||||
val onSuccessful = {
|
||||
// return to normal state
|
||||
System.gc()
|
||||
screen = 0
|
||||
full.handler.unlockToggle()
|
||||
full.unlockTransition()
|
||||
(INGAME as TerrarumIngame).autosaveTimer = 0f
|
||||
}
|
||||
|
||||
|
||||
/*val saveTime_t = App.getTIME_T()
|
||||
val playerSavefile = getPlayerSaveFiledesc(INGAME.playerSavefileName)
|
||||
val worldSavefile = getWorldSaveFiledesc(INGAME.worldSavefileName)
|
||||
|
||||
|
||||
INGAME.makeSavegameBackupCopy(playerSavefile)
|
||||
WriteSavegame(saveTime_t, WriteSavegame.SaveMode.PLAYER, INGAME.playerDisk, playerSavefile, INGAME as TerrarumIngame, false, onError) {
|
||||
|
||||
@@ -123,13 +131,12 @@ class UIInventoryEscMenu(val full: UIInventoryFull) : UICanvas() {
|
||||
}
|
||||
|
||||
// return to normal state
|
||||
System.gc()
|
||||
screen = 0
|
||||
full.handler.unlockToggle()
|
||||
full.unlockTransition()
|
||||
(INGAME as TerrarumIngame).autosaveTimer = 0f
|
||||
onSuccessful()
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
INGAME.saveTheGame(onSuccessful, onError)
|
||||
|
||||
|
||||
}
|
||||
1 -> {
|
||||
|
||||
@@ -7,11 +7,8 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
||||
import net.torvald.random.HQRNG
|
||||
import net.torvald.random.XXHash64
|
||||
import net.torvald.terrarum.App
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.App.printdbg
|
||||
import net.torvald.terrarum.ModMgr
|
||||
import net.torvald.terrarum.Second
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.langpack.Lang
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame.Companion.NEW_WORLD_SIZE
|
||||
@@ -91,6 +88,7 @@ class UINewWorld(val remoCon: UIRemoCon) : UICanvas() {
|
||||
private val backButton = UIItemTextButton(this, "MENU_LABEL_BACK", drawX + (width/2 - goButtonWidth) / 2, drawY + height - 24, goButtonWidth, true, alignment = UIItemTextButton.Companion.Alignment.CENTRE, hasBorder = true)
|
||||
private val goButton = UIItemTextButton(this, "MENU_LABEL_CONFIRM_BUTTON", drawX + width/2 + (width/2 - goButtonWidth) / 2, drawY + height - 24, goButtonWidth, true, alignment = UIItemTextButton.Companion.Alignment.CENTRE, hasBorder = true)
|
||||
|
||||
|
||||
init {
|
||||
goButton.clickOnceListener = { _, _ ->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user