adventure-game #3

Open
Kenwood wants to merge 80 commits from adventure-game into master
1 changed files with 10 additions and 10 deletions
Showing only changes of commit 493b663b4e - Show all commits

View File

@ -101,16 +101,16 @@ class Handler(npyscreen.ButtonPress):
self.parent.update_log("You must specify something to pick up.") self.parent.update_log("You must specify something to pick up.")
elif command == 'OPEN': elif command == 'OPEN':
#try: try:
self.parent.parentApp.log.info('Player tried to open door: {0}'.format(arguments[0])) self.parent.parentApp.log.info('Player tried to open door: {0}'.format(arguments[0]))
new_room = room[arguments[0].lower()]['leads_to'] new_room = room[arguments[0].lower()]['leads_to']
self.parent.parentApp.log.debug('New room is: {0}'.format(new_room)) self.parent.parentApp.log.debug('New room is: {0}'.format(new_room))
upon_enter = player.change_room(new_room) # Change the player to that new room. upon_enter = player.change_room(new_room) # Change the player to that new room.
self.parent.update_log(upon_enter) # Print the new room upon enter text. self.parent.update_log(upon_enter) # Print the new room upon enter text.
#except KeyError: except KeyError:
# self.parent.update_log("You cant open that.") self.parent.update_log("You cant open that.")
#except IndexError: except IndexError:
# self.parent.update_log("you must specify something to open") self.parent.update_log("you must specify something to open")
else: else:
self.parent.parentApp.log.info('Player\'s command was not understood: {0}'.format(command)) self.parent.parentApp.log.info('Player\'s command was not understood: {0}'.format(command))