From 1970a1b47d6198f0bfd75124b45c82fb23a52e52 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sat, 7 Aug 2021 19:51:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E6=AD=A3=E4=B8=80=E5=A4=84=E6=8B=BC?= =?UTF-8?q?=E5=86=99=E9=94=99=E8=AF=AF=EF=BC=8C=E7=AE=80=E5=8C=96the=5Fbox?= =?UTF-8?q?=E8=B0=9C=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_console.lua | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 2bc6de50..4470d1f6 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -747,7 +747,7 @@ local commands={}do log{C.A,"Example: switchhost 127.0.0.1 26000 /sock"} end end, - description="Switch to appother host", + description="Switch to another host", details={ "Disconnect all connections and switch to another host", "", @@ -821,10 +821,6 @@ local combKey={ } --Environment for user's function -local noLog=false -local function log_user(str) - log(noLog and"CHEATER."or tostring(str)) -end local userG={ timer=TIME, @@ -833,7 +829,7 @@ local userG={ tonumber=tonumber,tostring=tostring, select=select,next=next, ipairs=ipairs,pairs=pairs, - print=log_user,type=type, + print=log,type=type, pcall=pcall,xpcall=xpcall, rawget=rawget,rawset=rawset,rawlen=rawlen,rawequal=rawequal, setfenv=setfenv,setmetatable=setmetatable, @@ -859,14 +855,10 @@ local fleg={ supw=7126, second_box="Coming soon", }setmetatable(fleg,{__tostring=function()return"The fl\97g."end}) -function userG.the_box(k,f) - if k~=first_key then log"Usage:"log"?"return end - if not f or type(f)~='function'then log"Second arg is a function"return end - noLog=true - if f()~=f then noLog=false log"Return itself"return end - if f(26)~=math.huge then noLog=false log"Lucky number → Infinity"return end - noLog=false - log"*You Lose*" +function userG.the_box(k) + if k~=first_key then log"Usage:"log"*The box is locked*"return end + log"*Breaking sound*" + userG.the_box,userG.the_key=nil,nil return fleg end userG.the_key=first_key