From 52a3c01829d48679f98cd9cac0a07b513fc7f694 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 15 Dec 2020 10:34:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E8=AF=8D=E5=85=B8=E7=9A=84?= =?UTF-8?q?=E5=BD=A9=E8=9B=8B=E6=96=87=E6=9C=AC=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 增强词典的彩蛋文本功能 --- parts/scenes/dict.lua | 48 +++++++++++++++---------------------------- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index 8a67f591..8957277f 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -39,44 +39,30 @@ local function clearResult() for _=1,#result do rem(result)end selected,scrollPos,waiting,lastSearch=1,0,0,false end -local miniGame={ - ["15"]="15p", - ["15p"]="15p", - hrd="15p", - huarongdao="15p", - shuzihuarongdao="15p", +local eggInput={ + ["15"]="mg_15p",["15p"]="mg_15p", + hrd="mg_15p",huarongdao="mg_15p",shuzihuarongdao="mg_15p", - schulte="schulteG", - schulteg="schulteG", - schultegrid="schulteG", - shuerte="schulteG", - shuertefangge="schulteG", + schulte="mg_schulteG",schulteg="mg_schulteG",schultegrid="mg_schulteG", + shuerte="mg_schulteG",shuertefangge="mg_schulteG", - ping="pong", - pong="pong", - tanqiu="pong", + ping="mg_pong",pong="mg_pong",tanqiu="mg_pong", - abc="AtoZ", - abcde="AtoZ", - abcdefg="AtoZ", - atoz="AtoZ", - AtoZ="AtoZ", - dazi="AtoZ", + abc="mg_AtoZ",abcde="mg_AtoZ",abcdefg="mg_AtoZ", + atoz="mg_AtoZ",AtoZ="mg_AtoZ",dazi="mg_AtoZ", - uttt="UTTT", - tictactoe="UTTT", - ultimatetictactoe="UTTT", - ultimateTicTacToe="UTTT", - jingziqi="UTTT", - zhanluejingziqi="UTTT", + uttt="mg_UTTT",tictactoe="mg_UTTT",ultimatetictactoe="mg_UTTT", + ultimateTicTacToe="mg_UTTT",jingziqi="mg_UTTT",zhanluejingziqi="mg_UTTT", - cf="cubefield", - cbfd="cubefield", - cubefield="cubefield", + cf="mg_cubefield",cbfd="mg_cubefield",cubefield="mg_cubefield", } local function search() - if miniGame[input]then - SCN.go("mg_"..miniGame[input]) + if eggInput[input]then + if type(eggInput[input])=="string"then + SCN.go(eggInput[input]) + elseif type(eggInput[input])=="function"then + eggInput[input]() + end else clearResult() local first