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