调整上个commit的相关内容
This commit is contained in:
@@ -127,7 +127,7 @@ function DATA.pasteBoard(str)-- Paste [str] data to [page] board
|
|||||||
p=p+1
|
p=p+1
|
||||||
end
|
end
|
||||||
|
|
||||||
return true, F, #str>lineLimit*10
|
return true,F,#str>lineLimit*10
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
@@ -213,25 +213,12 @@ end
|
|||||||
function DATA.pasteQuestArgs(str)
|
function DATA.pasteQuestArgs(str)
|
||||||
if #str<4 then return end
|
if #str<4 then return end
|
||||||
local ENV={}
|
local ENV={}
|
||||||
ENV.holdCount= str:byte(1)-48
|
ENV.holdCount= MATH.clamp(str:byte(1)-48,0,26)
|
||||||
if ENV.holdCount<0 or ENV.holdCount>6 then
|
|
||||||
-- hold count invalid
|
|
||||||
if ENV.holdCount>=7 and ENV.holdCount<=9 then
|
|
||||||
-- hold count clearly intended to be a number, set to 6
|
|
||||||
ENV.holdCount=6
|
|
||||||
MES.new('warn',text.customDataInvalidHold1)
|
|
||||||
else
|
|
||||||
-- hold count is a random character, reset to 1
|
|
||||||
ENV.holdCount=1
|
|
||||||
MES.new('warn',text.customDataInvalidHold2)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
ENV.ospin= str:byte(2)~=90
|
ENV.ospin= str:byte(2)~=90
|
||||||
ENV.missionKill=str:byte(3)~=90
|
ENV.missionKill=str:byte(3)~=90
|
||||||
ENV.sequence= str:sub(4)
|
ENV.sequence= str:sub(4)
|
||||||
-- hard coding list of generators because there is no other way to obtain it
|
if select(2,require"parts.player.seqGenerators"(ENV.sequence)) then
|
||||||
if not TABLE.find({'bag','bagES','his','hisPool','c2','bagP1inf','rnd','mess','reverb','loop','fixed'}, ENV.sequence) then
|
MES.new('warn',text.invalidSequence)
|
||||||
MES.new('warn',text.customDataInvalidSequence)
|
|
||||||
ENV.sequence='bag'
|
ENV.sequence='bag'
|
||||||
end
|
end
|
||||||
return true,ENV
|
return true,ENV
|
||||||
|
|||||||
@@ -95,13 +95,8 @@ return {
|
|||||||
dataCorrupted="Data corrupted",
|
dataCorrupted="Data corrupted",
|
||||||
pasteWrongPlace="Did you paste in the wrong place?",
|
pasteWrongPlace="Did you paste in the wrong place?",
|
||||||
noFile="File missing",
|
noFile="File missing",
|
||||||
|
invalidSequence="Invalid sequence mode",
|
||||||
-- data validation for custom game data import
|
tooHighField="Field data exceeded 126 lines abandoned",
|
||||||
customDataInvalidHold1="Invalid Hold queue length in custom mode data. Resetting to 6.",
|
|
||||||
customDataInvalidHold2="Invalid Hold queue length in custom mode data. Resetting to 1.",
|
|
||||||
customDataInvalidSequence="Invalid sequence mode in custom mode data. Resetting to bag.",
|
|
||||||
customDataBoardLineLimit="One or more fields in the data exceeded height limit (126 lines).\nParts exceeding the limit have been removed.",
|
|
||||||
customDataSingleBoardLineLimit="Field data exceeded height limit (126 lines).\nParts exceeding the limit have been removed.",
|
|
||||||
|
|
||||||
nowPlaying="Now playing:",
|
nowPlaying="Now playing:",
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ return {
|
|||||||
dataCorrupted="Los datos están corruptos.",
|
dataCorrupted="Los datos están corruptos.",
|
||||||
pasteWrongPlace="¿Pegaste en la carpeta correcta?",
|
pasteWrongPlace="¿Pegaste en la carpeta correcta?",
|
||||||
noFile="Archivo no encontrado",
|
noFile="Archivo no encontrado",
|
||||||
|
-- invalidSequence="Invalid sequence mode",
|
||||||
|
-- tooHighField="Field data exceeded 126 lines abandoned",
|
||||||
|
|
||||||
nowPlaying="Reproduciendo:",
|
nowPlaying="Reproduciendo:",
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ return {
|
|||||||
dataCorrupted="Données corrompues",
|
dataCorrupted="Données corrompues",
|
||||||
-- pasteWrongPlace="Paste at wrong place?",
|
-- pasteWrongPlace="Paste at wrong place?",
|
||||||
noFile="Fichier non trouvé",
|
noFile="Fichier non trouvé",
|
||||||
|
-- invalidSequence="Invalid sequence mode",
|
||||||
|
-- tooHighField="Field data exceeded 126 lines abandoned",
|
||||||
|
|
||||||
nowPlaying="En train de jouer :",
|
nowPlaying="En train de jouer :",
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ return {
|
|||||||
dataCorrupted="Data rusak",
|
dataCorrupted="Data rusak",
|
||||||
pasteWrongPlace="Apakah Anda menempelkannya di tempat yang salah?",
|
pasteWrongPlace="Apakah Anda menempelkannya di tempat yang salah?",
|
||||||
noFile="File tidak ada",
|
noFile="File tidak ada",
|
||||||
|
-- invalidSequence="Invalid sequence mode",
|
||||||
|
-- tooHighField="Field data exceeded 126 lines abandoned",
|
||||||
|
|
||||||
nowPlaying="Musik:",
|
nowPlaying="Musik:",
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ return {
|
|||||||
dataCorrupted="データが破損してます",
|
dataCorrupted="データが破損してます",
|
||||||
pasteWrongPlace="貼り付ける位置を間違っていませんか?",
|
pasteWrongPlace="貼り付ける位置を間違っていませんか?",
|
||||||
noFile="ファイルが見つかりません",
|
noFile="ファイルが見つかりません",
|
||||||
|
-- invalidSequence="Invalid sequence mode",
|
||||||
|
-- tooHighField="Field data exceeded 126 lines abandoned",
|
||||||
|
|
||||||
nowPlaying="再生中:",
|
nowPlaying="再生中:",
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,8 @@ return {
|
|||||||
dataCorrupted="Data corrompida",
|
dataCorrupted="Data corrompida",
|
||||||
-- pasteWrongPlace="Paste at wrong place?",
|
-- pasteWrongPlace="Paste at wrong place?",
|
||||||
-- noFile="File not found",
|
-- noFile="File not found",
|
||||||
|
-- invalidSequence="Invalid sequence mode",
|
||||||
|
-- tooHighField="Field data exceeded 126 lines abandoned",
|
||||||
|
|
||||||
VKTchW="Peso de toque",
|
VKTchW="Peso de toque",
|
||||||
VKOrgW="Peso da origem",
|
VKOrgW="Peso da origem",
|
||||||
|
|||||||
@@ -84,6 +84,8 @@ return {
|
|||||||
dataCorrupted="XXXXX",
|
dataCorrupted="XXXXX",
|
||||||
pasteWrongPlace="_?X.",
|
pasteWrongPlace="_?X.",
|
||||||
-- noFile="File not found",
|
-- noFile="File not found",
|
||||||
|
-- invalidSequence="Invalid sequence mode",
|
||||||
|
-- tooHighField="Field data exceeded 126 lines abandoned",
|
||||||
|
|
||||||
nowPlaying="~:",
|
nowPlaying="~:",
|
||||||
|
|
||||||
|
|||||||
@@ -100,6 +100,8 @@ return {
|
|||||||
dataCorrupted="Dữ liệu bị hỏng",
|
dataCorrupted="Dữ liệu bị hỏng",
|
||||||
pasteWrongPlace="Bạn có dán đúng nơi không đấy?",
|
pasteWrongPlace="Bạn có dán đúng nơi không đấy?",
|
||||||
noFile="Thiếu tệp",
|
noFile="Thiếu tệp",
|
||||||
|
-- invalidSequence="Invalid sequence mode",
|
||||||
|
-- tooHighField="Field data exceeded 126 lines abandoned",
|
||||||
|
|
||||||
nowPlaying="Đang phát:",
|
nowPlaying="Đang phát:",
|
||||||
|
|
||||||
|
|||||||
@@ -95,13 +95,8 @@ return {
|
|||||||
dataCorrupted="数据损坏",
|
dataCorrupted="数据损坏",
|
||||||
pasteWrongPlace="提醒:可能粘贴错地方了",
|
pasteWrongPlace="提醒:可能粘贴错地方了",
|
||||||
noFile="找不到文件",
|
noFile="找不到文件",
|
||||||
|
invalidSequence="无效序列模式",
|
||||||
-- data validation for custom game data import
|
tooHighField="超过126行的场地数据已被丢弃",
|
||||||
customDataInvalidHold1="自定义模式数据中的 Hold 数量错误。重置为 6。",
|
|
||||||
customDataInvalidHold2="自定义模式数据中的 Hold 数量错误。重置为 1。",
|
|
||||||
customDataInvalidSequence="自定义模式数据中的序列模式不存在。重置为 bag。",
|
|
||||||
customDataBoardLineLimit="数据中一个或多个自定义场地的高度超过限制(126 行)。超出限制的部分已被移除。",
|
|
||||||
customDataSingleBoardLineLimit="数据中自定义场地的高度超过限制(126 行)。超出限制的部分已被移除。",
|
|
||||||
|
|
||||||
nowPlaying="正在播放:",
|
nowPlaying="正在播放:",
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ return {
|
|||||||
dataCorrupted="Error.DataCorrupted();",
|
dataCorrupted="Error.DataCorrupted();",
|
||||||
pasteWrongPlace="Error.PasteWrongPlace();",
|
pasteWrongPlace="Error.PasteWrongPlace();",
|
||||||
noFile="Error.NoFile();",
|
noFile="Error.NoFile();",
|
||||||
|
invalidSequence="Error.InvalidSequenceMode();",
|
||||||
|
tooHighField="Error.TooHighField();",
|
||||||
|
|
||||||
nowPlaying="NowPlaying=",
|
nowPlaying="NowPlaying=",
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,8 @@ return {
|
|||||||
dataCorrupted="數據損壞",
|
dataCorrupted="數據損壞",
|
||||||
pasteWrongPlace="提醒:可能黏貼錯地方了",
|
pasteWrongPlace="提醒:可能黏貼錯地方了",
|
||||||
noFile="文件未找到",
|
noFile="文件未找到",
|
||||||
|
invalidSequence="無效序列模式",
|
||||||
|
tooHighField="超過126行的場地數據已被丟棄",
|
||||||
|
|
||||||
nowPlaying="正在播放:",
|
nowPlaying="正在播放:",
|
||||||
|
|
||||||
|
|||||||
@@ -313,6 +313,6 @@ return function(s)-- Return a piece-generating function for player P
|
|||||||
"No sequence mode called "..s or
|
"No sequence mode called "..s or
|
||||||
"Wrong sequence generator"
|
"Wrong sequence generator"
|
||||||
)
|
)
|
||||||
return seqGenerators.bag
|
return seqGenerators.bag,true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ function scene.keyDown(key,isRep)
|
|||||||
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 args=str:sub((str:find(":") or 0)+1):split("!")
|
local args=str:sub((str:find(":") or 0)+1):split("!")
|
||||||
local flagHasBoardWithLineLimit=false
|
local hasTooHighField=false
|
||||||
repeat
|
repeat
|
||||||
if #args<4 then break end-- goto THROW_fail
|
if #args<4 then break end-- goto THROW_fail
|
||||||
local success,env=DATA.pasteQuestArgs(args[1])
|
local success,env=DATA.pasteQuestArgs(args[1])
|
||||||
@@ -211,12 +211,11 @@ function scene.keyDown(key,isRep)
|
|||||||
TABLE.cut(CUSTOMGAME_LOCAL.field)
|
TABLE.cut(CUSTOMGAME_LOCAL.field)
|
||||||
CUSTOMGAME_LOCAL.field[1]=DATA.newBoard()
|
CUSTOMGAME_LOCAL.field[1]=DATA.newBoard()
|
||||||
for i=4,#args do
|
for i=4,#args do
|
||||||
|
|
||||||
if args[i]:find("%S") then
|
if args[i]:find("%S") then
|
||||||
local success, F, flagBoardLineLimit=DATA.pasteBoard(args[i])
|
local success,F,hitHeightLimit=DATA.pasteBoard(args[i])
|
||||||
if success then
|
if success then
|
||||||
if flagBoardLineLimit then
|
if hitHeightLimit then
|
||||||
flagHasBoardWithLineLimit=true
|
hasTooHighField=true
|
||||||
end
|
end
|
||||||
CUSTOMGAME_LOCAL.field[i-3]=F
|
CUSTOMGAME_LOCAL.field[i-3]=F
|
||||||
else
|
else
|
||||||
@@ -224,8 +223,8 @@ function scene.keyDown(key,isRep)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if flagHasBoardWithLineLimit then
|
if hasTooHighField then
|
||||||
MES.new('warn', text.customDataBoardLineLimit)
|
MES.new('warn',text.tooHighField)
|
||||||
end
|
end
|
||||||
MES.new('check',text.importSuccess)
|
MES.new('check',text.importSuccess)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -237,11 +237,11 @@ function scene.keyDown(key)
|
|||||||
end
|
end
|
||||||
str=str:sub(p+1)
|
str=str:sub(p+1)
|
||||||
end
|
end
|
||||||
local success,F, flagBoardLineLimit=DATA.pasteBoard(str)
|
local success,F,hitHeightLimit=DATA.pasteBoard(str)
|
||||||
if success then
|
if success then
|
||||||
FIELD[page]=F
|
FIELD[page]=F
|
||||||
if flagBoardLineLimit then
|
if hitHeightLimit then
|
||||||
MES.new('warn', text.customDataSingleBoardLineLimit)
|
MES.new('warn',text.tooHighField)
|
||||||
end
|
end
|
||||||
MES.new('check',text.importSuccess)
|
MES.new('check',text.importSuccess)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user