adventure-game #3

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

View File

@ -59,7 +59,6 @@ class Handler(npyscreen.ButtonPress):
room = parse(self.parent.parentApp.mainPath / 'gamedata/world/blank_room.yaml')
# By now we should be situated in our room, and with our player.
self.parent.parentApp.log.debug(room)
# TODO: Should upgrade these to use fuzzy words library! and not direct comparisons!
if command == 'LOOK':
@ -75,7 +74,7 @@ class Handler(npyscreen.ButtonPress):
except KeyError:
self.parent.update_log("Not sure what you're trying to look at.")
if command == 'PICK':
elif command == 'PICK':
if arguments[0] == 'UP':
if len(arguments) <= 2: # If there are only 2 args ex:up, item then we dont need to merge that last arg
try:
@ -91,6 +90,9 @@ class Handler(npyscreen.ButtonPress):
self.parent.update_log(room[long_arg.lower()]['pick_up'])
except KeyError:
self.parent.update_log("You cant pick that up.")
else:
self.parent.parentApp.log.info('Player\'s command was not understood: {0}'.format(command))
self.parent.update_log('I didn\'t understand {0}'.format(command))
if command == 'WHERE':
# TODO: this should take the human readable room name, not the code-name