From 4567f19885df9e24ca063c293506226983d91eb0 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 6 Mar 2021 15:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E5=86=8D=E6=94=AF=E6=8C=81=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E6=97=A7=E7=89=88=E6=9C=AC=E7=BB=9F=E8=AE=A1=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=EF=BC=8C=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5=E5=AD=98?= =?UTF-8?q?=E6=A1=A3=E6=8F=90=E7=A4=BA=E4=BF=A1=E6=81=AF=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/savedata.lua | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/parts/scenes/savedata.lua b/parts/scenes/savedata.lua index 68b3c3cf..e5b8eacb 100644 --- a/parts/scenes/savedata.lua +++ b/parts/scenes/savedata.lua @@ -51,17 +51,19 @@ scene.widgetList={ if D then TABLE.add(D,RANKS) FILE.save(RANKS,"conf/unlock") + LOG.print(text.importSuccess,"message") else - LOG.print(text.importSuccess,COLOR.green) + LOG.print(text.dataCorrupted,"warn") end end}, WIDGET.newButton{name="importData", x=490,y=300,w=280,h=100,color="lBlue",font=25,code=function() local D=parseCB() - if D then + if D and D.version==STAT.version then TABLE.add(D,STAT) FILE.save(STAT,"conf/data") + LOG.print(text.importSuccess,"message") else - LOG.print(text.importSuccess,COLOR.green) + LOG.print(text.dataCorrupted,"warn") end end}, WIDGET.newButton{name="importSetting", x=790,y=300,w=280,h=100,color="lBlue",font=25,code=function() @@ -69,8 +71,9 @@ scene.widgetList={ if D then TABLE.add(D,SETTING) FILE.save(SETTING,"conf/settings") + LOG.print(text.importSuccess,"message") else - LOG.print(text.importSuccess,COLOR.green) + LOG.print(text.dataCorrupted,"warn") end end}, WIDGET.newButton{name="importVK", x=1090,y=300,w=280,h=100,color="lBlue",font=25,code=function() @@ -78,8 +81,9 @@ scene.widgetList={ if D then TABLE.add(D,VK_org) FILE.save(VK_org,"conf/virtualkey") + LOG.print(text.importSuccess,"message") else - LOG.print(text.importSuccess,COLOR.green) + LOG.print(text.dataCorrupted,"warn") end end},