mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-10 18:44:05 +09:00
adding 'kind flag' to the savegame format so the file can be determined if it contains player or world data
This commit is contained in:
@@ -62,6 +62,7 @@ class WorldSavingThread(
|
||||
override fun save() {
|
||||
|
||||
disk.saveMode = 2 * isAuto.toInt() // no quick
|
||||
disk.saveKind = VDSaveKind.WORLD_DATA
|
||||
|
||||
if (hasThumbnail) {
|
||||
while (!IngameRenderer.fboRGBexportedLatch) {
|
||||
@@ -224,6 +225,7 @@ class PlayerSavingThread(
|
||||
|
||||
override fun save() {
|
||||
disk.saveMode = 2 * isAuto.toInt() // no quick
|
||||
disk.saveKind = VDSaveKind.PLAYER_DATA
|
||||
disk.capacity = 0L
|
||||
|
||||
WriteSavegame.saveProgress = 0f
|
||||
|
||||
@@ -140,9 +140,12 @@ class QuickSingleplayerWorldSavingThread(
|
||||
}
|
||||
|
||||
|
||||
disk.saveKind = VDSaveKind.WORLD_DATA
|
||||
|
||||
skimmer.rewriteDirectories()
|
||||
skimmer.injectDiskCRC(disk.hashCode())
|
||||
skimmer.setSaveMode(1 + 2 * isAuto.toInt())
|
||||
skimmer.setSaveKind(VDSaveKind.WORLD_DATA)
|
||||
|
||||
printdbg(this, "Game saved with size of ${outFile.length()} bytes")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user