a few more savedata functions
This commit is contained in:
parent
a6f17c0f2a
commit
bbd9133b44
|
@ -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
|
Loading…
Reference in New Issue