调整控制台help命令输出,增加三条新的测试MES命令
This commit is contained in:
@@ -32,10 +32,13 @@ local commands={}do
|
|||||||
if #arg>0 then
|
if #arg>0 then
|
||||||
--help [command]
|
--help [command]
|
||||||
if commands[arg]then
|
if commands[arg]then
|
||||||
if commands[arg].details then
|
if commands[arg].description then
|
||||||
for _,v in ipairs(commands[arg].details)do log(v)end
|
log{C.H,("%s"):format(commands[arg].description)}
|
||||||
else
|
if commands[arg].details then
|
||||||
log{C.Y,("No details for command '%s'"):format(arg)}
|
for _,v in ipairs(commands[arg].details)do log(v)end
|
||||||
|
else
|
||||||
|
log{C.Y,("No details for command '%s'"):format(arg)}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
log{C.Y,("No command called '%s'"):format(arg)}
|
log{C.Y,("No command called '%s'"):format(arg)}
|
||||||
@@ -291,7 +294,22 @@ local commands={}do
|
|||||||
}
|
}
|
||||||
|
|
||||||
--System
|
--System
|
||||||
commands.error=error
|
commands.crash={
|
||||||
|
code=error,
|
||||||
|
description="Manually crash the game",
|
||||||
|
}
|
||||||
|
commands.message={
|
||||||
|
code=function(str)MES.new('warn',str,6)end,
|
||||||
|
description="Show a warn message",
|
||||||
|
}
|
||||||
|
commands.warn={
|
||||||
|
code=function(str)MES.new('warn',str,6)end,
|
||||||
|
description="Show a warn message",
|
||||||
|
}
|
||||||
|
commands.error={
|
||||||
|
code=function(str)MES.new('error',str,6)end,
|
||||||
|
description="Show an error message",
|
||||||
|
}
|
||||||
commands.openurl={
|
commands.openurl={
|
||||||
code=function(url)
|
code=function(url)
|
||||||
if url~=""then
|
if url~=""then
|
||||||
|
|||||||
Reference in New Issue
Block a user