From dc47b228f0e92339c64290d444bd8a477219711e Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Thu, 18 Nov 2021 21:28:35 -0800 Subject: [PATCH] Add advice to "exit" command by itself for "quit" command to quit the game Signed-off-by: Alek Ratzloff --- agame/trigger.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/agame/trigger.py b/agame/trigger.py index 87a5a9d..7322902 100644 --- a/agame/trigger.py +++ b/agame/trigger.py @@ -333,6 +333,10 @@ class GoTrigger(Trigger): if not item_name: otrigger = match["trigger"].lower().capitalize() game.say(f"{otrigger} where?") + if otrigger.lower() == "exit": + # I really really really hate this hack, but regex can only go so far + # perhaps a real parser is in order :I + game.say("{{Perhaps you meant ((quit))}}{{ to leave the game?}}") return item = game.room.search_item_name(item_name) if item and GO in item.triggers and item.revealed: