整理全局函数名以及库的require方法
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -21,7 +21,7 @@ function scene.sceneInit()
|
||||
end
|
||||
|
||||
function scene.wheelMoved(_,y)
|
||||
wheelScroll(y)
|
||||
WHEELMOV(y)
|
||||
end
|
||||
function scene.keyDown(key)
|
||||
local S=selected
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -16,7 +16,7 @@ function scene.keyDown(key)
|
||||
LOG.print(text.diffPassword)return
|
||||
end
|
||||
--[[
|
||||
json.encode{
|
||||
JSON.encode{
|
||||
username=username,
|
||||
email=email,
|
||||
password=password,
|
||||
|
||||
@@ -15,7 +15,7 @@ local function dumpCB(T)
|
||||
"string","base64",
|
||||
love.data.compress(
|
||||
"string","zlib",
|
||||
dumpTable(T)
|
||||
DUMPTABLE(T)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user