修复任务编辑(潜在)和序列编辑粘贴不当格式数据会有污染信息影响数据导致后续错误 closed #89
This commit is contained in:
@@ -187,7 +187,7 @@ function DATA.copyMission()
|
||||
end
|
||||
function DATA.pasteMission(str)
|
||||
local b
|
||||
local mission={}
|
||||
TABLE.cut(MISSION)
|
||||
local reg
|
||||
for i=1,#str do
|
||||
b=byte(str,i)
|
||||
@@ -200,24 +200,23 @@ function DATA.pasteMission(str)
|
||||
else
|
||||
if b>=34 and b<=114 then
|
||||
if missionEnum[reg]then
|
||||
ins(mission,reg)
|
||||
ins(MISSION,reg)
|
||||
reg=b-33
|
||||
else
|
||||
TABLE.cut(MISSION)
|
||||
return
|
||||
end
|
||||
elseif b>=115 and b<=126 then
|
||||
for _=1,b-113 do
|
||||
ins(mission,reg)
|
||||
ins(MISSION,reg)
|
||||
end
|
||||
reg=false
|
||||
end
|
||||
end
|
||||
end
|
||||
if reg then
|
||||
ins(mission,reg)
|
||||
ins(MISSION,reg)
|
||||
end
|
||||
|
||||
MISSION=mission
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
@@ -100,6 +100,7 @@ function scene.keyDown(key)
|
||||
MES.new('check',text.importSuccess)
|
||||
cur=#BAG
|
||||
else
|
||||
TABLE.cut(BAG)
|
||||
MES.new('error',text.dataCorrupted)
|
||||
end
|
||||
elseif key=="escape"then
|
||||
|
||||
Reference in New Issue
Block a user