From 80e5469653c421f642db9b0fbeaf8115e15a2ea1 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Wed, 27 Oct 2021 02:18:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=AC=E4=BA=8C=E6=AC=A1?= =?UTF-8?q?=E8=BF=9B=E8=AF=8D=E5=85=B8=E5=B0=B1=E7=88=86=E7=82=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/dict.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index 10c798e5..3bb71cf3 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -31,14 +31,17 @@ local typeColor={ name=COLOR.lV, } local function _scanDict(D) + if not D[1][1]then return end local c=CHAR.zChan.thinking + local cut=TABLE.cut for i=1,#D do local O=D[i] - O.title,O[1]=O[1]:gsub("[Tt]etris",c) - O.keywords,O[2]=O[2] - O.type,O[3]=O[3] - O.content,O[4]=O[4]:gsub("[Tt]etris",c) - O.url,O[5]=O[5] + O.title=O[1]:gsub("[Tt]etris",c) + O.keywords=O[2] + O.type=O[3] + O.content=O[4]:gsub("[Tt]etris",c) + O.url=O[5] + cut(O) end end local function _getList()return result[1]and result or dict end @@ -70,9 +73,7 @@ end function scene.sceneInit() dict=require("parts.language.dict_"..(SETTING.locale:find'zh'and'zh'or'en')) - if dict[1][1]then - _scanDict(dict) - end + _scanDict(dict) inputBox:clear() result={}