quest包含多场地,原格式失效(可手动修复),修复粘贴quest后左下小场地画面状态错误

This commit is contained in:
MrZ626
2020-12-29 23:29:49 +08:00
parent 1ec9b6417a
commit a99014b64b
2 changed files with 34 additions and 38 deletions

View File

@@ -81,6 +81,7 @@ function copyQuestArgs()
return str
end
function pasteQuestArgs(str)
if #str<4 then return end
local ENV=CUSTOMENV
ENV.holdCount= byte(str,1)-48
ENV.ospin= byte(str,2)~=90
@@ -184,8 +185,17 @@ function copyBoard(page)--Copy the [page] board
end
return data.encode("string","base64",data.compress("string","zlib",str))
end
function copyBoards()
local out={}
for i=1,#FIELD do
out[i]=copyBoard(i)
end
return table.concat(out,"!")
end
function pasteBoard(str,page)--Paste [str] data to [page] board
local F=FIELD[page or 1]
if not page then page=1 end
if not FIELD[page]then FIELD[page]=newBoard()end
local F=FIELD[page]
local _,__
--Decode