小修格式
This commit is contained in:
8
main.lua
8
main.lua
@@ -559,14 +559,13 @@ applySettings()
|
||||
|
||||
-- Load replays
|
||||
for _,fileName in next,fs.getDirectoryItems('replay') do
|
||||
while fileName:sub(12,12):match("[a-zA-Z]") do
|
||||
if fileName:sub(12,12):match("[a-zA-Z]") then repeat
|
||||
local date,mode,version,player,seed,setting,mod
|
||||
local fileData=fs.read('replay/'..fileName)
|
||||
local success,fileData=true,fs.read('replay/'..fileName)
|
||||
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
|
||||
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode] or mode
|
||||
version,fileData=STRING.readLine(fileData)
|
||||
player, fileData=STRING.readLine(fileData) if player=="Local Player" then player="Stacker" end
|
||||
local success
|
||||
success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
|
||||
if not success then break end
|
||||
seed, fileData=STRING.readLine(fileData)
|
||||
@@ -596,8 +595,7 @@ for _,fileName in next,fs.getDirectoryItems('replay') do
|
||||
)
|
||||
)
|
||||
fileName=newName
|
||||
break
|
||||
end
|
||||
until true end
|
||||
local rep=DATA.parseReplay('replay/'..fileName)
|
||||
table.insert(REPLAY,rep)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user