new savegame scheme suggestion

This commit is contained in:
minjaesong
2021-10-05 10:05:25 +09:00
parent dc0b5029f2
commit a6cfabf3bf
6 changed files with 47 additions and 83 deletions

View File

@@ -22,7 +22,7 @@ object Save : ConsoleCommand {
val ingame = Terrarum.ingame!! as TerrarumIngame
val savename = args[1].trim()
val disk = VDUtil.createNewDisk(1L shl 60, savename, Common.CHARSET)
val file = File(App.defaultSaveDir + "/${args[1]}")
val file = File(App.saveDir + "/${args[1]}")
WriteSavegame(disk, file, ingame, false)

View File

@@ -89,7 +89,7 @@ class UIInventoryEscMenu(val full: UIInventoryFull) : UICanvas() {
INGAME.makeSavegameBackupCopy()
// save the game
WriteSavegame(INGAME.savegameArchive, File(App.defaultSaveDir, INGAME.savegameNickname), Terrarum.ingame!! as TerrarumIngame, false) {
WriteSavegame(INGAME.savegameArchive, File(App.saveDir, INGAME.savegameNickname), Terrarum.ingame!! as TerrarumIngame, false) {
// callback:
System.gc()
screen = 0