整理代码
This commit is contained in:
@@ -14,6 +14,7 @@ local blind,disappear
|
||||
local startTime,time
|
||||
local state,progress
|
||||
local tapFX,mistake
|
||||
|
||||
function scene.sceneInit()
|
||||
BG.set("space")
|
||||
BGM.play("way")
|
||||
|
||||
@@ -64,11 +64,11 @@ function scene.keyDown(key)
|
||||
elseif key=="a"then
|
||||
SCN.go("custom_advance","swipeD")
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
local str="Techmino Quest:"..copyQuestArgs().."!"
|
||||
if #BAG>0 then str=str..copySequence()end
|
||||
local str="Techmino Quest:"..DATA.copyQuestArgs().."!"
|
||||
if #BAG>0 then str=str..DATA.copySequence()end
|
||||
str=str.."!"
|
||||
if #MISSION>0 then str=str..copyMission()end
|
||||
sys.setClipboardText(str.."!"..copyBoards().."!")
|
||||
if #MISSION>0 then str=str..DATA.copyMission()end
|
||||
sys.setClipboardText(str.."!"..DATA.copyBoards().."!")
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
@@ -76,13 +76,13 @@ function scene.keyDown(key)
|
||||
if #args<4 then goto THROW_fail end
|
||||
if not(
|
||||
pasteQuestArgs(args[1])and
|
||||
pasteSequence(args[2])and
|
||||
pasteMission(args[3])
|
||||
DATA.pasteSequence(args[2])and
|
||||
DATA.pasteMission(args[3])
|
||||
)then goto THROW_fail end
|
||||
repeat table.remove(FIELD)until #FIELD==0
|
||||
FIELD[1]=newBoard()
|
||||
FIELD[1]=DATA.newBoard()
|
||||
for i=4,#args do
|
||||
if not pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end
|
||||
if not DATA.pasteBoard(args[i],i-3)and i<#args then goto THROW_fail end
|
||||
end
|
||||
freshMiniFieldVisible()
|
||||
LOG.print(text.importSuccess,COLOR.G)
|
||||
|
||||
@@ -212,7 +212,7 @@ function scene.keyDown(key)
|
||||
SFX.play("fall",.8)
|
||||
end
|
||||
elseif key=="n"then
|
||||
ins(FIELD,page+1,newBoard(FIELD[page]))
|
||||
ins(FIELD,page+1,DATA.newBoard(FIELD[page]))
|
||||
page=page+1
|
||||
SFX.play("blip_1",.8)
|
||||
SYSFX.newShade(3,200,60,300,600,.5,1,.5)
|
||||
@@ -220,19 +220,19 @@ function scene.keyDown(key)
|
||||
rem(FIELD,page)
|
||||
page=max(page-1,1)
|
||||
if not FIELD[1]then
|
||||
ins(FIELD,newBoard())
|
||||
ins(FIELD,DATA.newBoard())
|
||||
end
|
||||
SYSFX.newShade(3,200,60,300,600,1,.5,.5)
|
||||
SFX.play("clear_4",.8)
|
||||
SFX.play("fall",.8)
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
sys.setClipboardText("Techmino Field:"..copyBoard(page))
|
||||
sys.setClipboardText("Techmino Field:"..DATA.copyBoard(page))
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local p=string.find(str,":")--ptr*
|
||||
if p then str=sub(str,p+1)end
|
||||
if pasteBoard(str,page)then
|
||||
if DATA.pasteBoard(str,page)then
|
||||
LOG.print(text.importSuccess,COLOR.G)
|
||||
else
|
||||
LOG.print(text.dataCorrupted,COLOR.R)
|
||||
|
||||
@@ -72,14 +72,14 @@ function scene.keyDown(key)
|
||||
end
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
if #MISSION>0 then
|
||||
sys.setClipboardText("Techmino Target:"..copyMission())
|
||||
sys.setClipboardText("Techmino Target:"..DATA.copyMission())
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
end
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local p=string.find(str,":")--ptr*
|
||||
if p then str=sub(str,p+1)end
|
||||
if pasteMission(str)then
|
||||
if DATA.pasteMission(str)then
|
||||
LOG.print(text.importSuccess,COLOR.G)
|
||||
cur=#MISSION
|
||||
else
|
||||
|
||||
@@ -87,14 +87,14 @@ function scene.keyDown(key)
|
||||
end
|
||||
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||
if #BAG>0 then
|
||||
sys.setClipboardText("Techmino SEQ:"..copySequence())
|
||||
sys.setClipboardText("Techmino SEQ:"..DATA.copySequence())
|
||||
LOG.print(text.exportSuccess,COLOR.G)
|
||||
end
|
||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||
local str=sys.getClipboardText()
|
||||
local p=string.find(str,":")--ptr*
|
||||
if p then str=sub(str,p+1)end
|
||||
if pasteSequence(str)then
|
||||
if DATA.pasteSequence(str)then
|
||||
LOG.print(text.importSuccess,COLOR.G)
|
||||
cur=#BAG
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user