mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
quicksave to write modification time to the disk
This commit is contained in:
@@ -151,6 +151,8 @@ class QuickSingleplayerWorldSavingThread(
|
||||
skimmer.setSaveMode(1 + 2 * isAuto.toInt())
|
||||
skimmer.setSaveKind(VDSaveKind.WORLD_DATA)
|
||||
skimmer.setSaveOrigin(skimmer.getSaveOrigin() and 15) // remove flag "imported" if applicable
|
||||
skimmer.setLastModifiedTime(time_t)
|
||||
skimmer.setCreationTime(creation_t)
|
||||
|
||||
printdbg(this, "Game saved with size of ${outFile.length()} bytes")
|
||||
|
||||
|
||||
@@ -170,10 +170,12 @@ class WorldSavingThread(
|
||||
|
||||
// Echo("Writing file to disk...")
|
||||
|
||||
disk.entries[0]!!.creationDate = creation_t
|
||||
disk.entries[0]!!.modificationDate = time_t
|
||||
// entry zero MUST NOT be used to get lastPlayDate, but we'll update it anyway
|
||||
// use entry -1 for that purpose!
|
||||
disk.capacity = 0
|
||||
|
||||
VDUtil.dumpToRealMachine(disk, outFile)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user