mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 10:34:06 +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)
|
// 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.LUMR] = 0.84
|
||||||
//p.actorValue[AVKey.LUMG] = 0.93
|
//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.gdx.graphics.PixmapIO2
|
||||||
import net.torvald.terrarum.App
|
import net.torvald.terrarum.App
|
||||||
import net.torvald.terrarum.TerrarumAppConfiguration
|
import net.torvald.terrarum.TerrarumAppConfiguration
|
||||||
|
import net.torvald.terrarum.gameactors.AVKey
|
||||||
import net.torvald.terrarum.modulebasegame.IngameRenderer
|
import net.torvald.terrarum.modulebasegame.IngameRenderer
|
||||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||||
import net.torvald.terrarum.savegame.*
|
import net.torvald.terrarum.savegame.*
|
||||||
@@ -43,6 +44,7 @@ class PlayerSavingThread(
|
|||||||
disk.saveOrigin = disk.saveOrigin and 15 // remove flag "imported" if applicable
|
disk.saveOrigin = disk.saveOrigin and 15 // remove flag "imported" if applicable
|
||||||
disk.capacity = 0L
|
disk.capacity = 0L
|
||||||
disk.snapshot = TerrarumAppConfiguration.VERSION_SNAPSHOT
|
disk.snapshot = TerrarumAppConfiguration.VERSION_SNAPSHOT
|
||||||
|
disk.saveMode = VDSaveMode(ingame.actorGamer.actorValue.getAsString(AVKey.GAMEMODE))
|
||||||
|
|
||||||
WriteSavegame.saveProgress = 0f
|
WriteSavegame.saveProgress = 0f
|
||||||
|
|
||||||
|
|||||||
@@ -296,6 +296,13 @@ object VDSaveOrigin {
|
|||||||
const val IMPORTED = 16
|
const val IMPORTED = 16
|
||||||
}
|
}
|
||||||
|
|
||||||
|
object VDSaveMode {
|
||||||
|
operator fun invoke(actorvalue: String?) = when (actorvalue?.lowercase()) {
|
||||||
|
"survival" -> 1
|
||||||
|
else -> 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
object VDFileID {
|
object VDFileID {
|
||||||
const val ROOT = 0L
|
const val ROOT = 0L
|
||||||
const val SAVEGAMEINFO = -1L
|
const val SAVEGAMEINFO = -1L
|
||||||
|
|||||||
Reference in New Issue
Block a user