整理全局函数名以及库的require方法

This commit is contained in:
MrZ626
2021-03-05 01:15:09 +08:00
parent 069b547e58
commit b1ca2c8dda
99 changed files with 135 additions and 132 deletions

View File

@@ -14,7 +14,7 @@ local ins,rem=table.insert,table.remove
-- 11~13:LL,RR,DD
local blockPos={4,4,4,4,4,5,4}
-------------------------------------------------Cold clear
local _CC=loadLib("CC",{
local _CC=LOADLIB("CC",{
Windows="CCloader",
Linux="CCloader",
Android="libCCloader.so",

View File

@@ -674,7 +674,7 @@ do--function dumpBasicConfig()
for _,key in next,gameSetting do
S[key]=SETTING[key]
end
return data.encode("string","base64",json.encode(S))
return data.encode("string","base64",JSON.encode(S))
end
end
do--function resetGameData(args)
@@ -965,8 +965,8 @@ do--function saveRecording()
(USER.name or"Player")
local fileBody=
GAME.seed.."\n"..
json.encode(GAME.setting).."\n"..
json.encode(getModList()).."\n"..
JSON.encode(GAME.setting).."\n"..
JSON.encode(getModList()).."\n"..
dumpRecording(GAME.rep)
--Write file
@@ -1071,7 +1071,7 @@ end
do
--[[
launch:
local res=json.decode(res.body)
local res=JSON.decode(res.body)
if res.message=="OK"then
LOG.print(res.notice,360,COLOR.sky)
if VERSION_CODE>=res.version_code then
@@ -1105,7 +1105,7 @@ do
PATH.http..PATH.user,
"GET",
{["Content-Type"]="application/json"},
json.encode{
JSON.encode{
email=USER.email,
authToken=USER.authToken,
}
@@ -1126,13 +1126,13 @@ do
LOG.print(text.loginSuccessed)
--TODO:getUserInfo
json.encode{
JSON.encode{
email=USER.email,
authToken=USER.authToken,
}
--TODO:getAccessToken
json.encode{
JSON.encode{
email=USER.email,
authToken=USER.authToken,
}
@@ -1150,13 +1150,13 @@ do
PATH.http..PATH.access,
"POST",
{["Content-Type"]="application/json"},
json.encode{
JSON.encode{
email=USER.email,
authToken=USER.authToken,
}
)
else
local err=json.decode(res.body)
local err=JSON.decode(res.body)
if err then
LOG.print(text.httpCode..res.code..": "..err.message,"warn")
end
@@ -1233,7 +1233,7 @@ do
LOG.print(text.wsClose..message,"warn")
return
else
message=json.decode(message)
message=JSON.decode(message)
end
end
elseif status~="connecting"then
@@ -1256,7 +1256,7 @@ do
LOG.print(text.wsClose..message,"warn")
return
else
message=json.decode(message)
message=JSON.decode(message)
end
end
end

View File

@@ -1,4 +1,4 @@
return splitStr([=[
return SPLITSTR([=[
Gameplay:
The system will provide you with tetrominoes (4-block pieces),
with a total of 7 types, and the player needs to control them

View File

@@ -1,4 +1,4 @@
return splitStr([=[
return SPLITSTR([=[
游戏方法:
系统会提供的一个个四连骨牌("方块",总共7种)
玩家需要控制(左右移动和旋转90,180,270度)这些骨牌直到下落到场地底部,锁定

View File

@@ -49,7 +49,7 @@ return{
mText(drawableText.nextWave,69,380)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Waves "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -60,7 +60,7 @@ return{
mText(drawableText.nextWave,69,380)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Waves "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -21,7 +21,7 @@ return{
mStr(P.stat.clears[4],69,340)
end,
score=function(P)return{min(P.stat.row,200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -27,7 +27,7 @@ return{
gc.draw(IMG.electric,124,106,0,2.6)
end,
score=function(P)return{min(P.stat.row,200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -28,7 +28,7 @@ return{
gc.draw(IMG.electric,124,106,0,2.6)
end,
score=function(P)return{min(P.stat.row,200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -24,7 +24,7 @@ return{
gc.draw(IMG.electric,124,106,0,2.6)
end,
score=function(P)return{min(P.stat.row,200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -27,7 +27,7 @@ return{
gc.draw(IMG.electric,124,106,0,2.6)
end,
score=function(P)return{min(P.stat.row,100),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -56,7 +56,7 @@ return{
mStr(P.stat.clears[4],69,340)
end,
score=function(P)return{min(P.stat.row,40),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -60,7 +60,7 @@ return{
mText(drawableText.maxcmb,69,450)
end,
score=function(P)return{min(P.modeData.point,100),P.stat.time}end,
scoreDisp=function(D)return D[1].." Combo "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Combo "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.modeData.point

View File

@@ -58,7 +58,7 @@ return{
mText(drawableText.maxcmb,69,450)
end,
score=function(P)return{min(P.modeData.point,100),P.stat.time}end,
scoreDisp=function(D)return D[1].." Combo "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Combo "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -55,7 +55,7 @@ return{
mText(drawableText.rpm,69,380)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Waves "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -55,7 +55,7 @@ return{
mText(drawableText.rpm,69,380)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Waves "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -27,7 +27,7 @@ return{
mStr(100-P.stat.dig,69,265)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.dig<100 then return end

View File

@@ -24,7 +24,7 @@ return{
mStr(10-P.stat.dig,69,265)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.dig<10 then return end

View File

@@ -27,7 +27,7 @@ return{
mStr(400-P.stat.dig,69,265)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.dig<400 then return end

View File

@@ -27,7 +27,7 @@ return{
mStr(40-P.stat.dig,69,265)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.dig<40 then return end

View File

@@ -107,7 +107,7 @@ return{
mStr(R>=0 and R or 0,69,265)
end,
score=function(P)return{min(P.stat.row,100),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -21,7 +21,7 @@ return{
mStr(R>=0 and R or 0,69,265)
end,
score=function(P)return{min(P.stat.row,100),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -6,7 +6,7 @@ return{
env={
noTele=true,
wait=8,fall=20,
target=10,dropPiece=function (P)
target=10,dropPiece=function(P)
if P.combo>1 or P.b2b>0 or P.lastPiece.row>1 then
if P.combo>1 then P:showText("2x",0,-220,40,"flicker",.3)end
if P.b2b>0 then P:showText("spin",0,-160,40,"flicker",.3)end

View File

@@ -37,7 +37,7 @@ return{
gc.rectangle("fill",25,375,90,4)
end,
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -33,7 +33,7 @@ return{
gc.rectangle("fill",25,375,90,4)
end,
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -63,7 +63,7 @@ return{
gc.rectangle("fill",25,375,90,4)
end,
score=function(P)return{P.modeData.point,P.stat.time}end,
scoreDisp=function(D)return D[1].."P "..toTime(D[2])end,
scoreDisp=function(D)return D[1].."P "..TIMESTR(D[2])end,
comp=function(a,b)
return a[1]>b[1]or(a[1]==b[1]and a[2]<b[2])
end,

View File

@@ -65,7 +65,7 @@ return{
gc.rectangle("fill",25,375,90,4)
end,
score=function(P)return{P.modeData.point,P.stat.time}end,
scoreDisp=function(D)return D[1].."P "..toTime(D[2])end,
scoreDisp=function(D)return D[1].."P "..TIMESTR(D[2])end,
comp=function(a,b)
return a[1]>b[1]or(a[1]==b[1]and a[2]<b[2])
end,

View File

@@ -62,7 +62,7 @@ return{
gc.rectangle("fill",25,375,90,4)
end,
score=function(P)return{P.modeData.point,P.stat.time}end,
scoreDisp=function(D)return D[1].."P "..toTime(D[2])end,
scoreDisp=function(D)return D[1].."P "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local S=P.modeData.point

View File

@@ -154,7 +154,7 @@ return{
gc.rectangle("fill",25,375,90,4)
end,
score=function(P)return{P.result=="WIN"and 260 or P.modeData.point,P.stat.time}end,
scoreDisp=function(D)return D[1].."P "..toTime(D[2])end,
scoreDisp=function(D)return D[1].."P "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local p=P.modeData.point

View File

@@ -22,7 +22,7 @@ return{
mText(drawableText.pc,69,432)
end,
score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." PCs "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.pc

View File

@@ -22,7 +22,7 @@ return{
mText(drawableText.pc,69,432)
end,
score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." PCs "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.pc

View File

@@ -20,7 +20,7 @@ return{
mText(drawableText.pc,69,432)
end,
score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." PCs "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.pc

View File

@@ -69,7 +69,7 @@ return{
mText(drawableText.pc,69,412)
end,
score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." PCs "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.pc

View File

@@ -59,7 +59,7 @@ return{
mText(drawableText.pc,69,412)
end,
score=function(P)return{P.stat.pc,P.stat.time}end,
scoreDisp=function(D)return D[1].." PCs "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." PCs "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.pc

View File

@@ -66,7 +66,7 @@ return{
gc.circle("line",69,200,30+45*beat)
end,
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -66,7 +66,7 @@ return{
gc.circle("line",69,200,30+45*beat)
end,
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -72,7 +72,7 @@ return{
gc.circle("line",69,200,30+45*beat)
end,
score=function(P)return{math.min(P.stat.row,200),P.stat.time}end,
scoreDisp=function(D)return D[1].." Lines "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Lines "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.row

View File

@@ -25,7 +25,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("CC",10,1,true,10000))
end,
score=function(P)return{P.stat.piece,P.stat.time}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Pieces "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -25,7 +25,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("CC",10,2,true,16000))
end,
score=function(P)return{P.stat.piece,P.stat.time}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Pieces "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -25,7 +25,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("CC",10,3,true,26000))
end,
score=function(P)return{P.stat.piece,P.stat.time}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Pieces "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -25,7 +25,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("CC",10,1,true,13000))
end,
score=function(P)return{P.stat.piece,P.stat.time}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Pieces "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -25,7 +25,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("CC",10,3,true,40000))
end,
score=function(P)return{P.stat.piece,P.stat.time}end,
scoreDisp=function(D)return D[1].." Pieces "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Pieces "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -12,7 +12,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("9S",4))
end,
score=function(P)return{P.stat.time}end,
scoreDisp=function(D)return toTime(D[1])end,
scoreDisp=function(D)return TIMESTR(D[1])end,
comp=function(a,b)return a[1]<b[1]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -12,7 +12,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("9S",6))
end,
score=function(P)return{P.stat.time}end,
scoreDisp=function(D)return toTime(D[1])end,
scoreDisp=function(D)return TIMESTR(D[1])end,
comp=function(a,b)return a[1]<b[1]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -12,7 +12,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("CC",6,2,true,30000))
end,
score=function(P)return{P.stat.time}end,
scoreDisp=function(D)return toTime(D[1])end,
scoreDisp=function(D)return TIMESTR(D[1])end,
comp=function(a,b)return a[1]<b[1]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -12,7 +12,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("9S",5))
end,
score=function(P)return{P.stat.time}end,
scoreDisp=function(D)return toTime(D[1])end,
scoreDisp=function(D)return TIMESTR(D[1])end,
comp=function(a,b)return a[1]<b[1]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -12,7 +12,7 @@ return{
PLY.newAIPlayer(2,AIBUILDER("CC",7,3,true,50000))
end,
score=function(P)return{P.stat.time}end,
scoreDisp=function(D)return toTime(D[1])end,
scoreDisp=function(D)return TIMESTR(D[1])end,
comp=function(a,b)return a[1]<b[1]end,
getRank=function(P)
if P.result=="WIN"then

View File

@@ -18,7 +18,7 @@ return{
PLY.draw.drawTargetLine(P,r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or(a[1]==b[1] and a[2]<b[2])end,
getRank=function(P)
if P.stat.row<40 then return end

View File

@@ -17,7 +17,7 @@ return{
PLY.draw.drawTargetLine(P,r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or(a[1]==b[1] and a[2]<b[2])end,
getRank=function(P)
if P.stat.row<40 then return end

View File

@@ -16,7 +16,7 @@ return{
PLY.draw.drawTargetLine(P,r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.row<1000 then return end

View File

@@ -16,7 +16,7 @@ return{
PLY.draw.drawTargetLine(P,r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.row<100 then return end

View File

@@ -16,7 +16,7 @@ return{
PLY.draw.drawTargetLine(P,r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.row<10 then return end

View File

@@ -16,7 +16,7 @@ return{
PLY.draw.drawTargetLine(P,r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.row<20 then return end

View File

@@ -16,7 +16,7 @@ return{
PLY.draw.drawTargetLine(P,r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.row<400 then return end

View File

@@ -16,7 +16,7 @@ return{
PLY.draw.drawTargetLine(P,r)
end,
score=function(P)return{P.stat.time,P.stat.piece}end,
scoreDisp=function(D)return toTime(D[1]).." "..D[2].." Pieces"end,
scoreDisp=function(D)return TIMESTR(D[1]).." "..D[2].." Pieces"end,
comp=function(a,b)return a[1]<b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
if P.stat.row<40 then return end

View File

@@ -31,7 +31,7 @@ return{
mText(drawableText.wave,69,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Waves "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -37,7 +37,7 @@ return{
mText(drawableText.wave,69,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Waves "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -32,7 +32,7 @@ return{
mText(drawableText.wave,69,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Waves "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -36,7 +36,7 @@ return{
mText(drawableText.wave,69,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Waves "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -38,7 +38,7 @@ return{
mText(drawableText.wave,69,375)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].." Waves "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Waves "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local W=P.modeData.event

View File

@@ -23,7 +23,7 @@ return{
mText(drawableText.eff,69,363)
end,
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Attack "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.atk

View File

@@ -35,7 +35,7 @@ return{
mText(drawableText.eff,69,363)
end,
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Attack "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.atk

View File

@@ -22,7 +22,7 @@ return{
mText(drawableText.eff,69,363)
end,
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Attack "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.atk

View File

@@ -32,7 +32,7 @@ return{
mText(drawableText.eff,69,363)
end,
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Attack "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.atk

View File

@@ -22,7 +22,7 @@ return{
mText(drawableText.eff,69,363)
end,
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Attack "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.atk

View File

@@ -32,7 +32,7 @@ return{
mText(drawableText.eff,69,363)
end,
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Attack "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.atk

View File

@@ -22,7 +22,7 @@ return{
mText(drawableText.eff,69,363)
end,
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Attack "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.atk

View File

@@ -32,7 +32,7 @@ return{
mText(drawableText.eff,69,363)
end,
score=function(P)return{P.stat.atk<=200 and int(P.stat.atk)or 200,P.stat.time}end,
scoreDisp=function(D)return D[1].." Attack "..toTime(D[2])end,
scoreDisp=function(D)return D[1].." Attack "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local L=P.stat.atk

View File

@@ -27,7 +27,7 @@ return{
mText(drawableText.tsd,69,315)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
scoreDisp=function(D)return D[1].."TSD "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local T=P.modeData.event

View File

@@ -28,7 +28,7 @@ return{
mText(drawableText.tsd,69,315)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
scoreDisp=function(D)return D[1].."TSD "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local T=P.modeData.event

View File

@@ -28,7 +28,7 @@ return{
mText(drawableText.tsd,69,315)
end,
score=function(P)return{P.modeData.event,P.stat.time}end,
scoreDisp=function(D)return D[1].."TSD "..toTime(D[2])end,
scoreDisp=function(D)return D[1].."TSD "..TIMESTR(D[2])end,
comp=function(a,b)return a[1]>b[1]or a[1]==b[1]and a[2]<b[2]end,
getRank=function(P)
local T=P.modeData.event

View File

@@ -223,7 +223,7 @@ end
local function loadRemoteEnv(P,confStr)--Load gameEnv
local _,conf=pcall(love.data.decode,"string","base64",confStr)
if _ then
conf=json.decode(conf)
conf=JSON.decode(conf)
else
conf={}
LOG.print("Bad conf from "..P.userName.."#"..P.userID)

View File

@@ -70,7 +70,7 @@ function scene.keyDown(key)
LOG.print(text.exportSuccess,COLOR.green)
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
local str=sys.getClipboardText()
local args=splitStr(str:sub((str:find(":")or 0)+1),"!")
local args=SPLITSTR(str:sub((str:find(":")or 0)+1),"!")
if #args<4 then goto fail end
if not(
pasteQuestArgs(args[1])and

View File

@@ -14,7 +14,7 @@ function scene.sceneInit()
end
function scene.wheelMoved(_,y)
wheelScroll(y)
WHEELMOV(y)
end
function scene.keyDown(k)
if k=="up"then

View File

@@ -94,7 +94,7 @@ local loadingThread=coroutine.create(function()
STAT.run=STAT.run+1
LOADED=true
--[[TODO
WS.send("user",json.encode{
WS.send("user",JSON.encode{
id=USER.id,
authToken=USER.authToken,
})

View File

@@ -7,7 +7,7 @@ local function login()
LOG.print(text.noPassword)return
end
--[[TODO
WS.send("user",json.encode{
WS.send("user",JSON.encode{
email=email,
password=password,
})

View File

@@ -72,13 +72,13 @@ scene.widgetList={
if LOGIN then
--[[TODO
if USER.accessToken then
WS.send("app",json.encode{
WS.send("app",JSON.encode{
opration="access",
email=USER.email,
accessToken=USER.accessToken,
})
else
WS.send("app",json.encode{
WS.send("app",JSON.encode{
opration="access",
email=USER.email,
authToken=USER.authToken,

View File

@@ -6,7 +6,7 @@ function scene.sceneInit()
end
function scene.wheelMoved(_,y)
wheelScroll(y)
WHEELMOV(y)
end
function scene.keyDown(k)
if k=="up"then

View File

@@ -21,7 +21,7 @@ function scene.sceneInit()
end
function scene.wheelMoved(_,y)
wheelScroll(y)
WHEELMOV(y)
end
function scene.keyDown(key)
local S=selected

View File

@@ -40,7 +40,7 @@ function scene.sceneBack()
end
function scene.wheelMoved(_,y)
wheelScroll(y)
WHEELMOV(y)
end
function scene.keyDown(k)
if k=="up"then
@@ -63,7 +63,7 @@ end
function scene.socketRead(mes)
local cmd=mes:sub(1,1)
local args=splitStr(mes:sub(2),";")
local args=SPLITSTR(mes:sub(2),";")
if cmd=="J"or cmd=="L"then
textBox:push{
COLOR.lR,args[1],

View File

@@ -151,10 +151,10 @@ end
function scene.socketRead(mes)
local cmd=mes:sub(1,1)
local args=splitStr(mes:sub(2),";")
local args=SPLITSTR(mes:sub(2),";")
if cmd=="J"then
if playerInitialized then
local L=splitStr(args[1],",")
local L=SPLITSTR(args[1],",")
textBox:push{
COLOR.lR,L[1],
COLOR.dY,"#"..L[2].." ",
@@ -162,7 +162,7 @@ function scene.socketRead(mes)
}
end
for i=1,#args do
local L=splitStr(args[i],",")
local L=SPLITSTR(args[i],",")
ins(playerData,{name=L[1],id=L[2],sid=L[3],conf=L[4],ready=L[5]=="1"})
end
playerInitialized=true

View File

@@ -8,7 +8,7 @@ local lastCreateRoomTime=0
local function enterRoom(roomID)
--[[TODO
WS.connect("play","/play",json.encode{
WS.connect("play","/play",JSON.encode{
email=USER.email,
token=USER.accessToken,
id=roomID,
@@ -21,7 +21,7 @@ local function fresh()
lastfreshTime=TIME()
rooms=nil
--[[TODO
WS.connect("play","/play",json.encode{
WS.connect("play","/play",JSON.encode{
email=USER.email,
accessToken=USER.accessToken,
})
@@ -38,7 +38,7 @@ function scene.sceneInit()
end
function scene.wheelMoved(_,y)
wheelScroll(y)
WHEELMOV(y)
end
function scene.keyDown(k)
if k=="r"then
@@ -48,7 +48,7 @@ function scene.keyDown(k)
elseif k=="n"then
if TIME()-lastCreateRoomTime>26 then
--[[TODO
WS.send("room",json.encode{
WS.send("room",JSON.encode{
email=USER.email,
accessToken=USER.accessToken,
room_name=(USER.name or"???").."'s room",

View File

@@ -40,7 +40,7 @@ function scene.sceneInit(org)
local frameLostRate=(S.frame/S.time/60-1)*100
form={
{COLOR.white,toTime(S.time),COLOR[frameLostRate>10 and"red"or frameLostRate>3 and"yellow"or"grey"],format(" (%.2f%%)",frameLostRate)},
{COLOR.white,TIMESTR(S.time),COLOR[frameLostRate>10 and"red"or frameLostRate>3 and"yellow"or"grey"],format(" (%.2f%%)",frameLostRate)},
format("%d/%d/%d",S.key,S.rotate,S.hold),
format("%d %.2fPPS",S.piece,S.piece/S.time),
format("%d(%d) %.2fLPM",S.row,S.dig,S.row/S.time*60),

View File

@@ -16,7 +16,7 @@ function scene.keyDown(key)
LOG.print(text.diffPassword)return
end
--[[
json.encode{
JSON.encode{
username=username,
email=email,
password=password,

View File

@@ -15,7 +15,7 @@ local function dumpCB(T)
"string","base64",
love.data.compress(
"string","zlib",
dumpTable(T)
DUMPTABLE(T)
)
)
)

View File

@@ -29,7 +29,7 @@ function scene.sceneInit()
item={
S.run,
S.game,
toTime(S.time),
TIMESTR(S.time),
S.key.." "..S.rotate.." "..S.hold,
S.piece.." "..S.row.." "..int(S.atk),
S.recv.." "..S.off.." "..S.pend,

View File

@@ -1,4 +1,4 @@
return splitStr([=[
return SPLITSTR([=[
"Patron"(time ordered, may not accurate) Thanks!!!
<<<<<<<<<<rmb1000+>>>>>>>>>>
☆★★☆☆☆☆★★☆