整理代码,新增string扩展模块,把一些小模块合并进string和table扩展模块中
This commit is contained in:
@@ -72,7 +72,7 @@ function scene.keyDown(key)
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
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=STRING.split(str:sub((str:find(":")or 0)+1),"!")
|
||||
if #args<4 then goto THROW_fail end
|
||||
if not(
|
||||
pasteQuestArgs(args[1])and
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
local function login()
|
||||
local email= WIDGET.active.email.value
|
||||
local password= WIDGET.active.password.value
|
||||
if not legalEmail(email)then
|
||||
if not STRING.simpEmailCheck(email)then
|
||||
LOG.print(text.wrongEmail)return
|
||||
elseif #password==0 then
|
||||
LOG.print(text.noPassword)return
|
||||
|
||||
@@ -56,7 +56,7 @@ end
|
||||
|
||||
function scene.socketRead(mes)
|
||||
local cmd=mes:sub(1,1)
|
||||
local args=SPLITSTR(mes:sub(2),";")
|
||||
local args=STRING.split(mes:sub(2),";")
|
||||
if cmd=="J"or cmd=="L"then
|
||||
textBox:push{
|
||||
COLOR.lR,args[1],
|
||||
|
||||
@@ -38,7 +38,7 @@ function scene.sceneInit(org)
|
||||
|
||||
local frameLostRate=(S.frame/S.time/60-1)*100
|
||||
form={
|
||||
{COLOR.Z,TIMESTR(S.time),COLOR[frameLostRate>10 and"R"or frameLostRate>3 and"Y"or"H"],format(" (%.2f%%)",frameLostRate)},
|
||||
{COLOR.Z,STRING.time(S.time),COLOR[frameLostRate>10 and"R"or frameLostRate>3 and"Y"or"H"],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),
|
||||
|
||||
@@ -7,7 +7,7 @@ local function register()
|
||||
local password2=WIDGET.active.password2.value
|
||||
if #username==0 then
|
||||
LOG.print(text.noUsername)return
|
||||
elseif not legalEmail(email)then
|
||||
elseif not STRING.simpEmailCheck(email)then
|
||||
LOG.print(text.wrongEmail)return
|
||||
elseif #password==0 or #password2==0 then
|
||||
LOG.print(text.noPassword)return
|
||||
|
||||
@@ -6,7 +6,7 @@ local function dumpCB(T)
|
||||
"string","base64",
|
||||
love.data.compress(
|
||||
"string","zlib",
|
||||
DUMPTABLE(T)
|
||||
TABLE.dump(T)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -29,7 +29,7 @@ function scene.sceneInit()
|
||||
item={
|
||||
S.run,
|
||||
S.game,
|
||||
TIMESTR(S.time),
|
||||
STRING.time(S.time),
|
||||
S.key.." "..S.rotate.." "..S.hold,
|
||||
S.piece.." "..S.row.." "..int(S.atk),
|
||||
S.recv.." "..S.off.." "..S.pend,
|
||||
|
||||
Reference in New Issue
Block a user