a few more savedata functions

This commit is contained in:
Jill 2022-09-22 19:16:59 +03:00
parent a6f17c0f2a
commit bbd9133b44
1 changed files with 16 additions and 0 deletions

View File

@ -161,6 +161,15 @@ function self.save(instant)
end
end
function self.getLastSave()
checkIfInitialized()
if savedata._lastSave and savedata._lastSave[1] == 0 and savedata._lastSave[2] == 0 and savedata._lastSave[3] == 0 and savedata._lastSave[4] == 0 and savedata._lastSave[5] == 0 then
return nil
else
return savedata._lastSave
end
end
function uranium.init()
loadedSavedata = true
if savedataName then
@ -177,4 +186,11 @@ function uranium.update()
end
end
function self.enableAutosave()
checkIfInitialized()
function uranium.exit()
self.save(true)
end
end
return self