From 02051b5413f6470a83cb1bc11e669b8d490f4ece Mon Sep 17 00:00:00 2001 From: user670 <22617255+user670@users.noreply.github.com> Date: Mon, 8 Mar 2021 07:26:12 +0800 Subject: [PATCH] Changes to the command "festival" (#54) - festival no longer takes "flag" as a valid argument - `festival list` is now accepted, displaying a list of available festivals - festival will now prompt usage, rather than complain about an invalid festival, on empty args - added help for this command --- parts/scenes/app_cmd.lua | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/parts/scenes/app_cmd.lua b/parts/scenes/app_cmd.lua index 9c8e879d..3b1cc8a5 100644 --- a/parts/scenes/app_cmd.lua +++ b/parts/scenes/app_cmd.lua @@ -185,6 +185,16 @@ local command_help_messages={ "play " } }, + festival={ + description="Load a festival theme.", + details={ + "Load a festival theme.", + "", + "Usage:", + "festival list", + "festival " + } + }, } -- while I could have used a for loop to get this... the order at which the @@ -204,6 +214,7 @@ local command_help_list={ "rmwtm", "unlockall", "play", + "festival" } local command_help_page_size=10 @@ -305,13 +316,9 @@ function commands.play(m)--marathon_bfmax can only entered through here end end function commands.festival(name) - if name=="flag"then - BG.setDefault("none") - BGM.setDefault(false) - BG.set("none") - BGM.stop() - SFX.play("clear_4") - LOG.print("What are you looking for?",COLOR.G) + if name=="list" then + log("Available festivals:") + log("classic xmas sprfes zday") elseif name=="classic"then FESTIVAL=false BG.setDefault("space") @@ -332,7 +339,7 @@ function commands.festival(name) BG.setDefault("lanterns") BGM.setDefault("overzero") BGM.play() - elseif name then + elseif name~="" then log("No festival called "..name) else log"Usage: festival [festivalName]"