mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
registering gamemode 'survival'
This commit is contained in:
@@ -37,7 +37,9 @@ object PlayerBuilderTestSubject1 {
|
||||
// p.setPosition(3.0 * TILE_SIZE, 3.0 * TILE_SIZE)
|
||||
|
||||
|
||||
// PlayerBuilderSigrid.fillTestInventory(p.inventory)
|
||||
// PlayerBuilderSigrid.fillTestInventory(p.inventory) // commenting out: test is over
|
||||
p.actorValue[AVKey.GAMEMODE] = "survival"
|
||||
|
||||
|
||||
//p.actorValue[AVKey.LUMR] = 0.84
|
||||
//p.actorValue[AVKey.LUMG] = 0.93
|
||||
|
||||
@@ -3,6 +3,7 @@ package net.torvald.terrarum.modulebasegame.serialise
|
||||
import net.torvald.gdx.graphics.PixmapIO2
|
||||
import net.torvald.terrarum.App
|
||||
import net.torvald.terrarum.TerrarumAppConfiguration
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.modulebasegame.IngameRenderer
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import net.torvald.terrarum.savegame.*
|
||||
@@ -43,6 +44,7 @@ class PlayerSavingThread(
|
||||
disk.saveOrigin = disk.saveOrigin and 15 // remove flag "imported" if applicable
|
||||
disk.capacity = 0L
|
||||
disk.snapshot = TerrarumAppConfiguration.VERSION_SNAPSHOT
|
||||
disk.saveMode = VDSaveMode(ingame.actorGamer.actorValue.getAsString(AVKey.GAMEMODE))
|
||||
|
||||
WriteSavegame.saveProgress = 0f
|
||||
|
||||
|
||||
@@ -296,6 +296,13 @@ object VDSaveOrigin {
|
||||
const val IMPORTED = 16
|
||||
}
|
||||
|
||||
object VDSaveMode {
|
||||
operator fun invoke(actorvalue: String?) = when (actorvalue?.lowercase()) {
|
||||
"survival" -> 1
|
||||
else -> 0
|
||||
}
|
||||
}
|
||||
|
||||
object VDFileID {
|
||||
const val ROOT = 0L
|
||||
const val SAVEGAMEINFO = -1L
|
||||
|
||||
Reference in New Issue
Block a user