fix up saving indicator

This commit is contained in:
Jill 2022-09-24 12:33:59 +03:00
parent 89adfc8cb4
commit 97f91fb298
1 changed files with 6 additions and 9 deletions

View File

@ -2,6 +2,7 @@ local self = {}
local binser = require('stdlib.binser')
require('stdlib.util')
local scheduler = require('stdlib.scheduler')
local savedataName
local savedata = {
@ -158,6 +159,11 @@ function self.save(instant)
uranium:call('saveFinished')
else
self.saveNextFrame = true
scheduler:scheduleInTicks(2, function()
self.saveNextFrame = false
PROFILEMAN:SaveMachineProfile()
uranium:call('saveFinished')
end)
end
end
@ -177,15 +183,6 @@ function uranium.init()
end
end
function uranium.update()
if self.saveNextFrame then
self.saveNextFrame = false
PROFILEMAN:SaveMachineProfile()
uranium:call('saveFinished')
print('saved to profile')
end
end
function self.enableAutosave()
checkIfInitialized()
function uranium.exit()