From 464d5bedda322287000db414bce6a37d3dafef30 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Mon, 26 Jul 2021 17:07:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=8E=A7=E5=88=B6=E5=8F=B0?= =?UTF-8?q?=E5=86=85=E9=83=A8=E5=88=86=E5=91=BD=E4=BB=A4=E7=9A=84=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E6=96=87=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/app_console.lua | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/parts/scenes/app_console.lua b/parts/scenes/app_console.lua index 7f1d7171..14b2fbbe 100644 --- a/parts/scenes/app_console.lua +++ b/parts/scenes/app_console.lua @@ -35,11 +35,11 @@ local commands={}do if commands[arg]then if commands[arg].description then log{C.H,("%s"):format(commands[arg].description)} - if commands[arg].details then - for _,v in ipairs(commands[arg].details)do log(v)end - else - log{C.Y,("No details for command '%s'"):format(arg)} - end + end + if commands[arg].details then + for _,v in ipairs(commands[arg].details)do log(v)end + else + log{C.Y,("No details for command '%s'"):format(arg)} end else log{C.Y,("No command called '%s'"):format(arg)} @@ -58,6 +58,7 @@ local commands={}do end end end, + description="Display help messages", details={ "Display help messages.", "", @@ -80,8 +81,9 @@ local commands={}do } commands.exit={ code=backScene, + description="Return to the last menu", details={ - "Return to the previous menu.", + "Return to the last menu.", "", "Aliases: exit quit", "", @@ -413,13 +415,14 @@ local commands={}do else log("No BGM called "..bgm) end - else + else log("Already playing: "..bgm) - end + end else log{C.A,"Usage: playbgm [bgmName]"} end end, + description="Play a BGM", details={ "Play a BGM.", "", @@ -430,6 +433,7 @@ local commands={}do code=function() BGM.stop() end, + description="Stop the BGM", details={ "Stop the BGM.", "", @@ -735,6 +739,7 @@ local commands={}do log{C.A,"Example: switchhost 127.0.0.1 26000 /sock"} end end, + description="Switch to appother host", details={ "Disconnect all connections and switch to another host", "",