自定义游戏支持复制所有【题目】信息
This commit is contained in:
@@ -32,8 +32,6 @@ local langList={
|
|||||||
pauseCount="暂停统计",
|
pauseCount="暂停统计",
|
||||||
|
|
||||||
custom="自定义游戏",basic="常规",rule="规则",field="自定义场地",mission="任务",
|
custom="自定义游戏",basic="常规",rule="规则",field="自定义场地",mission="任务",
|
||||||
softdropdas="软降DAS:",
|
|
||||||
softdroparr="软降ARR:",
|
|
||||||
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
|
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
|
||||||
setting_game="游戏设置",
|
setting_game="游戏设置",
|
||||||
setting_video="画面设置",
|
setting_video="画面设置",
|
||||||
@@ -62,6 +60,7 @@ local langList={
|
|||||||
|
|
||||||
needRestart="重新开始以生效",
|
needRestart="重新开始以生效",
|
||||||
copySuccess="已复制到剪切板",
|
copySuccess="已复制到剪切板",
|
||||||
|
pasteSuccess="粘贴成功",
|
||||||
dataCorrupted="数据损坏",
|
dataCorrupted="数据损坏",
|
||||||
VKTchW="触摸点权重",
|
VKTchW="触摸点权重",
|
||||||
VKOrgW="原始点权重",
|
VKOrgW="原始点权重",
|
||||||
@@ -202,9 +201,13 @@ local langList={
|
|||||||
highCam="超屏视野",
|
highCam="超屏视野",
|
||||||
nextPos="生成预览",
|
nextPos="生成预览",
|
||||||
bone="骨块",
|
bone="骨块",
|
||||||
|
|
||||||
bg="背景",
|
bg="背景",
|
||||||
bgm="音乐",
|
bgm="音乐",
|
||||||
|
|
||||||
|
copy="复制序列+场地+任务",
|
||||||
|
paste="粘贴序列+场地+任务",
|
||||||
|
|
||||||
mission="←任务设置",
|
mission="←任务设置",
|
||||||
rule="更多规则(Tab)→",
|
rule="更多规则(Tab)→",
|
||||||
back="返回",
|
back="返回",
|
||||||
@@ -586,6 +589,7 @@ local langList={
|
|||||||
|
|
||||||
needRestart="重新开始以生效",
|
needRestart="重新开始以生效",
|
||||||
copySuccess="已复制到剪切板",
|
copySuccess="已复制到剪切板",
|
||||||
|
pasteSuccess="粘贴成功",
|
||||||
dataCorrupted="数据损坏",
|
dataCorrupted="数据损坏",
|
||||||
VKTchW="触摸点权重",
|
VKTchW="触摸点权重",
|
||||||
VKOrgW="原始点权重",
|
VKOrgW="原始点权重",
|
||||||
@@ -724,9 +728,13 @@ local langList={
|
|||||||
highCam="超屏视野",
|
highCam="超屏视野",
|
||||||
nextPos="生成预览",
|
nextPos="生成预览",
|
||||||
bone="骨块",
|
bone="骨块",
|
||||||
|
|
||||||
bg="背景",
|
bg="背景",
|
||||||
bgm="音乐",
|
bgm="音乐",
|
||||||
|
|
||||||
|
copy="复制序列+场地+任务",
|
||||||
|
paste="粘贴序列+场地+任务",
|
||||||
|
|
||||||
mission="←任务设置",
|
mission="←任务设置",
|
||||||
rule="更多规则(Tab)→",
|
rule="更多规则(Tab)→",
|
||||||
back="返回",
|
back="返回",
|
||||||
@@ -1108,6 +1116,7 @@ local langList={
|
|||||||
|
|
||||||
needRestart="Effective after restart",
|
needRestart="Effective after restart",
|
||||||
copySuccess="Copied successfully",
|
copySuccess="Copied successfully",
|
||||||
|
pasteSuccess="Pasted successfully",
|
||||||
dataCorrupted="Data corrupted",
|
dataCorrupted="Data corrupted",
|
||||||
VKTchW="Touch Weight",
|
VKTchW="Touch Weight",
|
||||||
VKOrgW="Origin Weight",
|
VKOrgW="Origin Weight",
|
||||||
@@ -1236,9 +1245,13 @@ local langList={
|
|||||||
highCam="Bird-eye view",
|
highCam="Bird-eye view",
|
||||||
nextPos="Next preview",
|
nextPos="Next preview",
|
||||||
bone="Bone Block",
|
bone="Bone Block",
|
||||||
|
|
||||||
bg="Background",
|
bg="Background",
|
||||||
bgm="Music",
|
bgm="Music",
|
||||||
|
|
||||||
|
copy="Copy Seq+Field+Misn",
|
||||||
|
paste="Paste Seq+Field+Misn",
|
||||||
|
|
||||||
mission="←Mission",
|
mission="←Mission",
|
||||||
rule="Rules (Tab)→",
|
rule="Rules (Tab)→",
|
||||||
back="Back",
|
back="Back",
|
||||||
@@ -1620,6 +1633,7 @@ local langList={
|
|||||||
|
|
||||||
needRestart="!!*#R#*!!",
|
needRestart="!!*#R#*!!",
|
||||||
copySuccess="~$~",
|
copySuccess="~$~",
|
||||||
|
pasteSuccess="~v~",
|
||||||
dataCorrupted="XXXXX",
|
dataCorrupted="XXXXX",
|
||||||
VKTchW="Tch↓",
|
VKTchW="Tch↓",
|
||||||
VKOrgW="Org↓",
|
VKOrgW="Org↓",
|
||||||
@@ -2102,8 +2116,6 @@ local langList={
|
|||||||
pauseCount="歇多久了",
|
pauseCount="歇多久了",
|
||||||
|
|
||||||
custom="自定义",basic="普通",rule="规则",field="自定义场地",mission="任务",
|
custom="自定义",basic="普通",rule="规则",field="自定义场地",mission="任务",
|
||||||
softdropdas="软降DAS:",
|
|
||||||
softdroparr="软降ARR:",
|
|
||||||
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
|
snapLevelName={"无吸附","10px吸附","20px吸附","40px吸附","60px吸附","80px吸附"},
|
||||||
setting_game="游戏设置",
|
setting_game="游戏设置",
|
||||||
setting_video="改画面",
|
setting_video="改画面",
|
||||||
@@ -2132,6 +2144,7 @@ local langList={
|
|||||||
|
|
||||||
needRestart="重新开始以生效",
|
needRestart="重新开始以生效",
|
||||||
copySuccess="已复制到剪切板",
|
copySuccess="已复制到剪切板",
|
||||||
|
pasteSuccess="粘贴成功",
|
||||||
dataCorrupted="数据损坏",
|
dataCorrupted="数据损坏",
|
||||||
VKTchW="触摸点权重",
|
VKTchW="触摸点权重",
|
||||||
VKOrgW="原始点权重",
|
VKOrgW="原始点权重",
|
||||||
@@ -2270,9 +2283,13 @@ local langList={
|
|||||||
highCam="超屏视野",
|
highCam="超屏视野",
|
||||||
nextPos="生成预览",
|
nextPos="生成预览",
|
||||||
bone="骨块",
|
bone="骨块",
|
||||||
|
|
||||||
bg="背景",
|
bg="背景",
|
||||||
bgm="音乐",
|
bgm="音乐",
|
||||||
|
|
||||||
|
copy="复制序列+场地+任务",
|
||||||
|
paste="粘贴序列+场地+任务",
|
||||||
|
|
||||||
mission="←任务设置",
|
mission="←任务设置",
|
||||||
rule="更多规则(Tab)→",
|
rule="更多规则(Tab)→",
|
||||||
back="返回",
|
back="返回",
|
||||||
@@ -2376,6 +2393,7 @@ local langList={
|
|||||||
setting_video={
|
setting_video={
|
||||||
sound="←改声音",
|
sound="←改声音",
|
||||||
game="游戏设置→",
|
game="游戏设置→",
|
||||||
|
block="方块可见",
|
||||||
ghost="阴影",
|
ghost="阴影",
|
||||||
smooth="平滑下落",
|
smooth="平滑下落",
|
||||||
center="旋转中心",
|
center="旋转中心",
|
||||||
@@ -2593,6 +2611,9 @@ local langList={
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
for k,v in next,langList[1] do
|
||||||
|
if not langList[2][k]then print(k)end
|
||||||
|
end
|
||||||
local publicText={
|
local publicText={
|
||||||
block={
|
block={
|
||||||
"Z","S","J","L","T","O","I",
|
"Z","S","J","L","T","O","I",
|
||||||
|
|||||||
@@ -185,6 +185,10 @@ local Widgets={
|
|||||||
newSelector({name="bg", x=1140, y=460, w=220,color="yellow", list=CUSlist.bg, disp=CUSval("bg"), code=function(i)customEnv.bg=i BG.set(i)end}),
|
newSelector({name="bg", x=1140, y=460, w=220,color="yellow", list=CUSlist.bg, disp=CUSval("bg"), code=function(i)customEnv.bg=i BG.set(i)end}),
|
||||||
newSelector({name="bgm", x=1140, y=540, w=220,color="yellow", list=CUSlist.bgm, disp=CUSval("bgm"), code=function(i)customEnv.bgm=i BGM.play(i)end}),
|
newSelector({name="bgm", x=1140, y=540, w=220,color="yellow", list=CUSlist.bgm, disp=CUSval("bgm"), code=function(i)customEnv.bgm=i BGM.play(i)end}),
|
||||||
|
|
||||||
|
--Copy/Paste Quest
|
||||||
|
newButton({name="copy", x=560, y=640, w=300,h=100, color="lRed", font=25,code=pressKey("cC")}),
|
||||||
|
newButton({name="paste", x=870, y=640, w=300,h=100, color="lBlue", font=25,code=pressKey("cV")}),
|
||||||
|
|
||||||
newButton({name="mission", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_mission","swipeR")}),
|
newButton({name="mission", x=900, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_mission","swipeR")}),
|
||||||
newButton({name="rule", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_rule","swipeL")}),
|
newButton({name="rule", x=1140, y=60, w=220,h=80, color="lBlue", font=25,code=swapScene("custom_rule","swipeL")}),
|
||||||
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
|
newButton({name="back", x=1140, y=640, w=170,h=80, color="white", font=40,code=BACK}),
|
||||||
|
|||||||
@@ -62,6 +62,57 @@ function restoreVirtualKey()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function copyQuestArgs()
|
||||||
|
local ENV=customEnv
|
||||||
|
local str=""
|
||||||
|
str=str..(ENV.hold and"H"or"Z")
|
||||||
|
str=str..(ENV.ospin and"O"or"Z")
|
||||||
|
str=str..(ENV.missionKill and"M"or"Z")
|
||||||
|
str=str..ENV.sequence
|
||||||
|
return str
|
||||||
|
end
|
||||||
|
function pasteQuestArgs(str)
|
||||||
|
local ENV=customEnv
|
||||||
|
ENV.hold= byte(str,1)~=90
|
||||||
|
ENV.ospin= byte(str,2)~=90
|
||||||
|
ENV.missionKill= byte(str,3)~=90
|
||||||
|
ENV.sequence= sub(str,4)
|
||||||
|
end
|
||||||
|
|
||||||
|
function copySequence()
|
||||||
|
local preBag=preBag
|
||||||
|
local str=""
|
||||||
|
|
||||||
|
for i=1,#preBag do
|
||||||
|
str=str..char(preBag[i]-1)
|
||||||
|
end
|
||||||
|
|
||||||
|
return data.encode("string","base64",data.compress("string","deflate",str))
|
||||||
|
end
|
||||||
|
function pasteSequence(str)
|
||||||
|
local _
|
||||||
|
|
||||||
|
--Decode
|
||||||
|
_,str=pcall(data.decode,"string","base64",str)
|
||||||
|
if not _ then return end
|
||||||
|
_,str=pcall(data.decompress,"string","deflate",str)
|
||||||
|
if not _ then return end
|
||||||
|
|
||||||
|
local bag={}
|
||||||
|
for i=1,#str do
|
||||||
|
_=byte(str,i)
|
||||||
|
if _<25 then
|
||||||
|
bag[i]=_+1
|
||||||
|
else
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
preBag=bag
|
||||||
|
sceneTemp.cur=#preBag
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
function copyBoard()
|
function copyBoard()
|
||||||
local str=""
|
local str=""
|
||||||
local H=0
|
local H=0
|
||||||
@@ -135,40 +186,6 @@ function pasteBoard(str)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
function copySequence()
|
|
||||||
local preBag=preBag
|
|
||||||
local str=""
|
|
||||||
|
|
||||||
for i=1,#preBag do
|
|
||||||
str=str..char(preBag[i]-1)
|
|
||||||
end
|
|
||||||
|
|
||||||
return data.encode("string","base64",data.compress("string","deflate",str))
|
|
||||||
end
|
|
||||||
function pasteSequence(str)
|
|
||||||
local _
|
|
||||||
|
|
||||||
--Decode
|
|
||||||
_,str=pcall(data.decode,"string","base64",str)
|
|
||||||
if not _ then return end
|
|
||||||
_,str=pcall(data.decompress,"string","deflate",str)
|
|
||||||
if not _ then return end
|
|
||||||
|
|
||||||
local bag={}
|
|
||||||
for i=1,#str do
|
|
||||||
_=byte(str,i)
|
|
||||||
if _<25 then
|
|
||||||
bag[i]=_+1
|
|
||||||
else
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
preBag=bag
|
|
||||||
sceneTemp.cur=#preBag
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
function copyMission()
|
function copyMission()
|
||||||
local str=""
|
local str=""
|
||||||
local preMission=preMission
|
local preMission=preMission
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ local max,min,sin,cos=math.max,math.min,math.sin,math.cos
|
|||||||
local log,rnd=math.log,math.random
|
local log,rnd=math.log,math.random
|
||||||
local format=string.format
|
local format=string.format
|
||||||
local ins,rem=table.insert,table.remove
|
local ins,rem=table.insert,table.remove
|
||||||
local byte=string.byte
|
local find,sub,char,byte=string.find,string.sub,string.char,string.byte
|
||||||
|
|
||||||
local scr=scr
|
local scr=scr
|
||||||
|
|
||||||
@@ -763,7 +763,7 @@ do--intro
|
|||||||
TASK.new(function(S)
|
TASK.new(function(S)
|
||||||
S[1]=S[1]-1
|
S[1]=S[1]-1
|
||||||
if S[1]==0 then
|
if S[1]==0 then
|
||||||
love.system.openURL(love.filesystem.getSaveDirectory())
|
sys.openURL(love.filesystem.getSaveDirectory())
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end,{60})
|
end,{60})
|
||||||
@@ -1233,6 +1233,44 @@ do--custom_basic
|
|||||||
else
|
else
|
||||||
SCN.swapTo("custom_rule","swipeL")
|
SCN.swapTo("custom_rule","swipeL")
|
||||||
end
|
end
|
||||||
|
elseif key=="c"and kb.isDown("lctrl","rctrl")or key=="cC"then
|
||||||
|
local str="Techmino Quest:"..copyQuestArgs().."_"
|
||||||
|
if #preBag>0 then str=str..copySequence()end
|
||||||
|
str=str.."_"..copyBoard().."_"
|
||||||
|
if #preMission>0 then str=str..copyMission()end
|
||||||
|
sys.setClipboardText(str.."_")
|
||||||
|
LOG.print(text.copySuccess,color.green)
|
||||||
|
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||||
|
local str=sys.getClipboardText()
|
||||||
|
local p1,p2,p3,p4,p5--ptr*
|
||||||
|
while true do
|
||||||
|
p1=find(str,":")or 0
|
||||||
|
p2=find(str,"_",p1+1)
|
||||||
|
if not p2 then break end
|
||||||
|
p3=find(str,"_",p2+1)
|
||||||
|
if not p3 then break end
|
||||||
|
p4=find(str,"_",p3+1)
|
||||||
|
if not p4 then break end
|
||||||
|
p5=find(str,"_",p4+1)or #str+1
|
||||||
|
|
||||||
|
pasteQuestArgs(sub(str,p1+1,p2-1))
|
||||||
|
if p2+1~=p3 then
|
||||||
|
if not pasteSequence(sub(str,p2+1,p3-1))then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if not pasteBoard(sub(str,p3+1,p4-1))then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
if p4+1~=p5 then
|
||||||
|
if not pasteMission(sub(str,p4+1,p5-1))then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
LOG.print(text.pasteSuccess,color.green)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
LOG.print(text.dataCorrupted,color.red)
|
||||||
elseif key=="escape"then
|
elseif key=="escape"then
|
||||||
SCN.back()
|
SCN.back()
|
||||||
else
|
else
|
||||||
@@ -1326,8 +1364,10 @@ do--custom_seq
|
|||||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||||
local str=sys.getClipboardText()
|
local str=sys.getClipboardText()
|
||||||
local p=string.find(str,":")--ptr*
|
local p=string.find(str,":")--ptr*
|
||||||
if p then str=string.sub(str,p+1)end
|
if p then str=sub(str,p+1)end
|
||||||
if not pasteSequence(str)then
|
if pasteSequence(str)then
|
||||||
|
LOG.print(text.pasteSuccess,color.green)
|
||||||
|
else
|
||||||
LOG.print(text.dataCorrupted,color.red)
|
LOG.print(text.dataCorrupted,color.red)
|
||||||
end
|
end
|
||||||
elseif key=="backspace"then
|
elseif key=="backspace"then
|
||||||
@@ -1548,8 +1588,10 @@ do--custom_draw
|
|||||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||||
local str=sys.getClipboardText()
|
local str=sys.getClipboardText()
|
||||||
local p=string.find(str,":")--ptr*
|
local p=string.find(str,":")--ptr*
|
||||||
if p then str=string.sub(str,p+1)end
|
if p then str=sub(str,p+1)end
|
||||||
if not pasteBoard(str)then
|
if pasteBoard(str)then
|
||||||
|
LOG.print(text.pasteSuccess,color.green)
|
||||||
|
else
|
||||||
LOG.print(text.dataCorrupted,color.red)
|
LOG.print(text.dataCorrupted,color.red)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@@ -1671,8 +1713,10 @@ do--custom_mission
|
|||||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||||
local str=sys.getClipboardText()
|
local str=sys.getClipboardText()
|
||||||
local p=string.find(str,":")--ptr*
|
local p=string.find(str,":")--ptr*
|
||||||
if p then str=string.sub(str,p+1)end
|
if p then str=sub(str,p+1)end
|
||||||
if not pasteMission(str)then
|
if not pasteMission(str)then
|
||||||
|
LOG.print(text.pasteSuccess,color.green)
|
||||||
|
else
|
||||||
LOG.print(text.dataCorrupted,color.red)
|
LOG.print(text.dataCorrupted,color.red)
|
||||||
end
|
end
|
||||||
elseif key=="backspace"then
|
elseif key=="backspace"then
|
||||||
|
|||||||
Reference in New Issue
Block a user