文件模块重构

This commit is contained in:
MrZ626
2020-12-14 18:33:48 +08:00
parent b6b87f5480
commit 654a5b9dfe
17 changed files with 76 additions and 238 deletions

View File

@@ -1358,7 +1358,7 @@ end
--------------------------<Events>--------------------------
local function gameOver()--Save record
if GAME.replaying then return end
FILE.saveData()
FILE.save(STAT,"data")
local M=GAME.curMode
local R=M.getRank
if R then
@@ -1388,7 +1388,7 @@ local function gameOver()--Save record
end
end
if needSave then
FILE.saveUnlock()
FILE.save(RANKS,"unlock")
end
local D=M.score(P)
local L=M.records
@@ -1406,7 +1406,7 @@ local function gameOver()--Save record
D.date=os.date("%Y/%m/%d %H:%M")
ins(L,p+1,D)
if L[11]then L[11]=nil end
FILE.saveRecord(M.name,L)
FILE.save(L,M.name,"",true)
end
end
end