排行文件使用rec后缀
This commit is contained in:
2
main.lua
2
main.lua
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user