From 4d85b25dab22362ade5f834efba46830f1cf0ee8 Mon Sep 17 00:00:00 2001 From: Joe S <31870999+KenwoodFox@users.noreply.github.com> Date: Wed, 24 Feb 2021 00:10:44 -0500 Subject: [PATCH] commands should be compared to uppercase commands --- Adventure Game/adventure_game/Handler.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Adventure Game/adventure_game/Handler.py b/Adventure Game/adventure_game/Handler.py index 66a7797..1afe77d 100644 --- a/Adventure Game/adventure_game/Handler.py +++ b/Adventure Game/adventure_game/Handler.py @@ -13,7 +13,7 @@ class Handler(npyscreen.ButtonPress): def whenPressed(self): self.parent.parentApp.log.debug('Send button pressed!') # This is the raw command from the user - raw_command = self.parent.dialogueBox.value + raw_command = self.parent.dialogueBox.value.upper() # Clear the dialogue box, TODO: This may become unneeded if issue #8 is fixed self.parent.dialogueBox.value = '' @@ -52,7 +52,10 @@ class Handler(npyscreen.ButtonPress): self.parent.parentApp.log.critical('Handler could not load the current room! Is the player file corrupt or was there a typo? Path was {0}'.format(self.parent.parentApp.mainPath / 'gamedata/world' / roomlocation)) # Put the player in a blank room i forgot to finish room = parse(self.parent.parentApp.mainPath / 'gamedata/world/blank_room.yaml') - self.parent.update_log('You are in {0}.'.format(room)) + + # By now we should be situated in our room, and with our player. + if command == '': + self.parent.update_log('You are in {0}.'.format(room)) # Log the command that we parsed self.parent.parentApp.log.info('Parsed command "{0}" with arguments "{1}"'.format(command, arguments))