修复粘贴场地可能报错,补充缺失的文本

This commit is contained in:
MrZ626
2021-05-13 23:26:41 +08:00
parent 5eeab94368
commit 8d0bfce39f
8 changed files with 10 additions and 1 deletions

View File

@@ -114,7 +114,9 @@ function DATA.pasteBoard(str,page)--Paste [str] data to [page] board
local _,__
--Decode
str=str:sub(str:find("%S"),str:find(".%s-$"))
if not str:find("%S")then return end
str=str:sub((str:find("%S"))):reverse()
str=str:sub((str:find("%S"))):reverse()
_,str=pcall(data.decode,'string','base64',str)
if not _ then return end
_,str=pcall(data.decompress,'string','zlib',str)

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="Exported successfully",
importSuccess="Imported successfully",
dataCorrupted="Data corrupted",
pasteWrongPlace="Paste at wrong place?",
noFile="File not found",
VKTchW="Touch Weight",

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="Exporté avec succès",
importSuccess="Importé avec succès",
dataCorrupted="Données corrompues",
-- pasteWrongPlace="Paste at wrong place?",
-- noFile="File not found",
VKTchW="Poids du toucher",

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="Exportado com sucesso",
importSuccess="Importado com sucesso",
dataCorrupted="Data corrompida",
-- pasteWrongPlace="Paste at wrong place?",
-- noFile="File not found",
VKTchW="Peso de toque",

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="Exportado con éxito",
importSuccess="Importado con éxito",
dataCorrupted="Los datos están corruptos.",
-- pasteWrongPlace="Paste at wrong place?",
-- noFile="File not found",
VKTchW="Sens. al tacto",

View File

@@ -47,6 +47,7 @@ return{
exportSuccess="~Out~",
importSuccess="~In~",
dataCorrupted="XXXXX",
pasteWrongPlace="_?X.",
-- noFile="File not found",
VKTchW="Tch↓",

View File

@@ -63,6 +63,7 @@ return{
exportSuccess="导出成功",
importSuccess="导入成功",
dataCorrupted="数据损坏",
pasteWrongPlace="提醒:可能粘贴错地方了",
noFile="找不到文件",
VKTchW="触摸点权重",

View File

@@ -229,6 +229,7 @@ function scene.keyDown(key)
if DATA.pasteBoard(str,page)then
LOG.print(text.importSuccess,COLOR.G)
else
print(text.dataCorrupted)
LOG.print(text.dataCorrupted,COLOR.R)
end
elseif key=="pageup"then