mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 12:34:05 +09:00
fixed a bug where list of savefiles won't sort by last play date
This commit is contained in:
@@ -688,7 +688,8 @@ fun AppUpdateListOfSavegames() {
|
|||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
}.filter { it != null }.sortedByDescending { (it as VirtualDisk).entries[0]!!.modificationDate }.forEach {
|
}.filter { it != null && it.entries.contains(-1) }
|
||||||
|
.sortedByDescending { (it as VirtualDisk).entries[-1]!!.modificationDate }.forEach {
|
||||||
App.savegames.add(it!!)
|
App.savegames.add(it!!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -142,6 +142,10 @@ class GameSavingThread(val disk: VirtualDisk, val outFile: File, val ingame: Ter
|
|||||||
WriteSavegame.saveProgress += actorProgressMultiplier
|
WriteSavegame.saveProgress += actorProgressMultiplier
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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
|
disk.capacity = 0
|
||||||
VDUtil.dumpToRealMachine(disk, outFile)
|
VDUtil.dumpToRealMachine(disk, outFile)
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ object WriteMeta {
|
|||||||
weatseed1 = WeatherMixer.RNG.state1,
|
weatseed1 = WeatherMixer.RNG.state1,
|
||||||
playerid = ingame.actorGamer.referenceID,
|
playerid = ingame.actorGamer.referenceID,
|
||||||
creation_t = ingame.creationTime,
|
creation_t = ingame.creationTime,
|
||||||
lastplay_t = App.getTIME_T(),
|
lastplay_t = time_t,
|
||||||
playtime_t = ingame.totalPlayTime + currentPlayTime_t,
|
playtime_t = ingame.totalPlayTime + currentPlayTime_t,
|
||||||
loadorder = ModMgr.loadOrder.toTypedArray(),
|
loadorder = ModMgr.loadOrder.toTypedArray(),
|
||||||
worlds = ingame.gameworldIndices.toTypedArray()
|
worlds = ingame.gameworldIndices.toTypedArray()
|
||||||
|
|||||||
Reference in New Issue
Block a user