making copy of the savegame immediately after the initial save

This commit is contained in:
minjaesong
2021-09-29 12:53:46 +09:00
parent 2891d0466e
commit f6eb567385
3 changed files with 26 additions and 7 deletions

View File

@@ -85,11 +85,9 @@ class UIInventoryEscMenu(val full: UIInventoryFull) : UICanvas() {
screen = 3; gameMenuButtons.deselect()
full.handler.lockToggle()
full.lockTransition()
// make backup of the old save
File(App.defaultSaveDir, INGAME.savegameNickname).copyTo(
File(App.defaultSaveDir, INGAME.savegameNickname+".1"), // don't use .bak as it's used by the savecracker
true
)
INGAME.makeSavegameBackupCopy()
// save the game
WriteSavegame(INGAME.savegameArchive, File(App.defaultSaveDir, INGAME.savegameNickname), Terrarum.ingame!! as TerrarumIngame) {
// callback: