改正一处拼写错误,简化the_box谜题
This commit is contained in:
@@ -747,7 +747,7 @@ local commands={}do
|
|||||||
log{C.A,"Example: switchhost 127.0.0.1 26000 /sock"}
|
log{C.A,"Example: switchhost 127.0.0.1 26000 /sock"}
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
description="Switch to appother host",
|
description="Switch to another host",
|
||||||
details={
|
details={
|
||||||
"Disconnect all connections and switch to another host",
|
"Disconnect all connections and switch to another host",
|
||||||
"",
|
"",
|
||||||
@@ -821,10 +821,6 @@ local combKey={
|
|||||||
}
|
}
|
||||||
|
|
||||||
--Environment for user's function
|
--Environment for user's function
|
||||||
local noLog=false
|
|
||||||
local function log_user(str)
|
|
||||||
log(noLog and"CHEATER."or tostring(str))
|
|
||||||
end
|
|
||||||
local userG={
|
local userG={
|
||||||
timer=TIME,
|
timer=TIME,
|
||||||
|
|
||||||
@@ -833,7 +829,7 @@ local userG={
|
|||||||
tonumber=tonumber,tostring=tostring,
|
tonumber=tonumber,tostring=tostring,
|
||||||
select=select,next=next,
|
select=select,next=next,
|
||||||
ipairs=ipairs,pairs=pairs,
|
ipairs=ipairs,pairs=pairs,
|
||||||
print=log_user,type=type,
|
print=log,type=type,
|
||||||
pcall=pcall,xpcall=xpcall,
|
pcall=pcall,xpcall=xpcall,
|
||||||
rawget=rawget,rawset=rawset,rawlen=rawlen,rawequal=rawequal,
|
rawget=rawget,rawset=rawset,rawlen=rawlen,rawequal=rawequal,
|
||||||
setfenv=setfenv,setmetatable=setmetatable,
|
setfenv=setfenv,setmetatable=setmetatable,
|
||||||
@@ -859,14 +855,10 @@ local fleg={
|
|||||||
supw=7126,
|
supw=7126,
|
||||||
second_box="Coming soon",
|
second_box="Coming soon",
|
||||||
}setmetatable(fleg,{__tostring=function()return"The fl\97g."end})
|
}setmetatable(fleg,{__tostring=function()return"The fl\97g."end})
|
||||||
function userG.the_box(k,f)
|
function userG.the_box(k)
|
||||||
if k~=first_key then log"Usage:"log"?"return end
|
if k~=first_key then log"Usage:"log"*The box is locked*"return end
|
||||||
if not f or type(f)~='function'then log"Second arg is a function"return end
|
log"*Breaking sound*"
|
||||||
noLog=true
|
userG.the_box,userG.the_key=nil,nil
|
||||||
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*"
|
|
||||||
return fleg
|
return fleg
|
||||||
end
|
end
|
||||||
userG.the_key=first_key
|
userG.the_key=first_key
|
||||||
|
|||||||
Reference in New Issue
Block a user