小修格式
This commit is contained in:
8
main.lua
8
main.lua
@@ -559,14 +559,13 @@ applySettings()
|
|||||||
|
|
||||||
-- Load replays
|
-- Load replays
|
||||||
for _,fileName in next,fs.getDirectoryItems('replay') do
|
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 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]","")
|
date, fileData=STRING.readLine(fileData)date=date:gsub("[a-zA-Z]","")
|
||||||
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode] or mode
|
mode, fileData=STRING.readLine(fileData)mode=MODE_UPDATE_MAP[mode] or mode
|
||||||
version,fileData=STRING.readLine(fileData)
|
version,fileData=STRING.readLine(fileData)
|
||||||
player, fileData=STRING.readLine(fileData) if player=="Local Player" then player="Stacker" end
|
player, fileData=STRING.readLine(fileData) if player=="Local Player" then player="Stacker" end
|
||||||
local success
|
|
||||||
success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
|
success,fileData=pcall(love.data.decompress,'string','zlib',fileData)
|
||||||
if not success then break end
|
if not success then break end
|
||||||
seed, fileData=STRING.readLine(fileData)
|
seed, fileData=STRING.readLine(fileData)
|
||||||
@@ -596,8 +595,7 @@ for _,fileName in next,fs.getDirectoryItems('replay') do
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
fileName=newName
|
fileName=newName
|
||||||
break
|
until true end
|
||||||
end
|
|
||||||
local rep=DATA.parseReplay('replay/'..fileName)
|
local rep=DATA.parseReplay('replay/'..fileName)
|
||||||
table.insert(REPLAY,rep)
|
table.insert(REPLAY,rep)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1282,13 +1282,11 @@ function Player:hold_norm(ifpre)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if success then
|
if success then break end
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if not success then -- All test failed, interrupt with sound
|
if not success then -- All test failed, interrupt with sound
|
||||||
SFX.play('drop_cancel')
|
SFX.play('drop_cancel')
|
||||||
do return end
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self.spinLast=false
|
self.spinLast=false
|
||||||
@@ -1353,13 +1351,11 @@ function Player:hold_swap(ifpre)
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if success then
|
if success then break end
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if not success then -- All test failed, interrupt with sound
|
if not success then -- All test failed, interrupt with sound
|
||||||
SFX.play('finesseError')
|
SFX.play('finesseError')
|
||||||
do return end
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self.spinLast=false
|
self.spinLast=false
|
||||||
|
|||||||
Reference in New Issue
Block a user