diff --git a/Adventure Game/adventure_game/Handler.py b/Adventure Game/adventure_game/Handler.py index 42b9e02..a5350fa 100644 --- a/Adventure Game/adventure_game/Handler.py +++ b/Adventure Game/adventure_game/Handler.py @@ -68,6 +68,12 @@ class Handler(npyscreen.ButtonPress): self.parent.update_log(room['look_around']) except KeyError: self.parent.update_log('There is nothing to look at?.. This might be a bug.') + if arguments[0] == 'AT': + try: + # Argument[1] is the "thing" you want to look at, yaml is lowercase so we lowercase it. + self.parent.update_log(room[arguments[1].lower()]['look_at']) + except KeyError: + self.parent.update_log("Not sure what you're trying to look at.") if command == 'WHERE': # TODO: this should take the human readable room name, not the code-name diff --git a/Adventure Game/adventure_game/logs/AdventureGame.log b/Adventure Game/adventure_game/logs/AdventureGame.log index af934e6..0ab50e5 100644 --- a/Adventure Game/adventure_game/logs/AdventureGame.log +++ b/Adventure Game/adventure_game/logs/AdventureGame.log @@ -1,5 +1,14 @@ INFO:root:Logging started! DEBUG:root:Gamelib at adventure_game\gamedata\gamelib.yaml DEBUG:root:Send button pressed! -WARNING:root:Command "" could not be split, was it malformed or incomplete? -INFO:root:Parsed command "" with arguments "[]" +DEBUG:root:{'grid': [0, 0], 'upon_enter': 'You are standing behind your desk, you see a |NAMEPLATE|, a |TAPE RECORDER| and your trusty |LOG VIEWER|', 'look_around': 'You look around the room, you see a |DESK|, a |BOOKSHELF| and the |DOOR|', 'pick_up_logviewer': 'You pick the *LOG VIEWER* up.', 'desk': {'look_at': 'You move to stand behind your desk. You see a |NAMEPLATE|, a |TAPE RECORDER| and your trusty |LOG VIEWER|', 'inspect': 'Desk, ornate, stuff'}, 'log_viewer': {'look_at': 'logviewer looks like garbo', 'inspect': 'beep boop', 'pick_up': 'You pick up the *LOG VIEWER*.'}} +INFO:root:Parsed command "LOOK" with arguments "['AROUND']" +DEBUG:root:Send button pressed! +DEBUG:root:{'grid': [0, 0], 'upon_enter': 'You are standing behind your desk, you see a |NAMEPLATE|, a |TAPE RECORDER| and your trusty |LOG VIEWER|', 'look_around': 'You look around the room, you see a |DESK|, a |BOOKSHELF| and the |DOOR|', 'pick_up_logviewer': 'You pick the *LOG VIEWER* up.', 'desk': {'look_at': 'You move to stand behind your desk. You see a |NAMEPLATE|, a |TAPE RECORDER| and your trusty |LOG VIEWER|', 'inspect': 'Desk, ornate, stuff'}, 'log_viewer': {'look_at': 'logviewer looks like garbo', 'inspect': 'beep boop', 'pick_up': 'You pick up the *LOG VIEWER*.'}} +INFO:root:Parsed command "LOOK" with arguments "['AT', 'DESK']" +DEBUG:root:Send button pressed! +DEBUG:root:{'grid': [0, 0], 'upon_enter': 'You are standing behind your desk, you see a |NAMEPLATE|, a |TAPE RECORDER| and your trusty |LOG VIEWER|', 'look_around': 'You look around the room, you see a |DESK|, a |BOOKSHELF| and the |DOOR|', 'pick_up_logviewer': 'You pick the *LOG VIEWER* up.', 'desk': {'look_at': 'You move to stand behind your desk. You see a |NAMEPLATE|, a |TAPE RECORDER| and your trusty |LOG VIEWER|', 'inspect': 'Desk, ornate, stuff'}, 'log_viewer': {'look_at': 'logviewer looks like garbo', 'inspect': 'beep boop', 'pick_up': 'You pick up the *LOG VIEWER*.'}} +INFO:root:Parsed command "LOOK" with arguments "['AT', 'DOOR']" +DEBUG:root:Send button pressed! +DEBUG:root:{'grid': [0, 0], 'upon_enter': 'You are standing behind your desk, you see a |NAMEPLATE|, a |TAPE RECORDER| and your trusty |LOG VIEWER|', 'look_around': 'You look around the room, you see a |DESK|, a |BOOKSHELF| and the |DOOR|', 'pick_up_logviewer': 'You pick the *LOG VIEWER* up.', 'desk': {'look_at': 'You move to stand behind your desk. You see a |NAMEPLATE|, a |TAPE RECORDER| and your trusty |LOG VIEWER|', 'inspect': 'Desk, ornate, stuff'}, 'log_viewer': {'look_at': 'logviewer looks like garbo', 'inspect': 'beep boop', 'pick_up': 'You pick up the *LOG VIEWER*.'}} +INFO:root:Parsed command "LOOK" with arguments "['AT', 'BOOKSHELF']"