排行文件使用rec后缀

This commit is contained in:
MrZ626
2020-12-14 16:49:36 +08:00
parent 020c87158c
commit 6e3961fe0f
3 changed files with 3 additions and 3 deletions

View File

@@ -267,7 +267,7 @@ if fs.getInfo("data.dat")then
fs.createDirectory("record")
for _,name in next,fs.getDirectoryItems("")do
if name:sub(-4)==".dat"then
fs.write("record/"..name,fs.read(name))
fs.write("record/"..name:sub(1,-4).."rec",fs.read(name))
fs.remove(name)
end
end

View File

@@ -1546,7 +1546,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.save(L,"record/"..M.name,"l")
FILE.save(L,"record/"..M.name..".rec","l")
end
end
end

View File

@@ -140,7 +140,7 @@ function scene.update()
for k,v in next,m do
M[k]=v
end
M.records=FILE.load(m.name..".dat")or M.score and{}
M.records=FILE.load("record/"..m.name..".rec")or M.score and{}
-- M.icon=gc.newImage("media/image/modeIcon/"..m.icon..".png")
-- M.icon=gc.newImage("media/image/modeIcon/custom.png")
elseif phase==8 then