commands should be compared to uppercase commands

This commit is contained in:
Joe S 2021-02-24 00:10:44 -05:00
parent 705a00fe9c
commit 4d85b25dab
1 changed files with 5 additions and 2 deletions

View File

@ -13,7 +13,7 @@ class Handler(npyscreen.ButtonPress):
def whenPressed(self): def whenPressed(self):
self.parent.parentApp.log.debug('Send button pressed!') self.parent.parentApp.log.debug('Send button pressed!')
# This is the raw command from the user # 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 # Clear the dialogue box, TODO: This may become unneeded if issue #8 is fixed
self.parent.dialogueBox.value = '' 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)) 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 # Put the player in a blank room i forgot to finish
room = parse(self.parent.parentApp.mainPath / 'gamedata/world/blank_room.yaml') 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 # Log the command that we parsed
self.parent.parentApp.log.info('Parsed command "{0}" with arguments "{1}"'.format(command, arguments)) self.parent.parentApp.log.info('Parsed command "{0}" with arguments "{1}"'.format(command, arguments))