adventure-game #3

Open
Kenwood wants to merge 80 commits from adventure-game into master
3 changed files with 8 additions and 5 deletions
Showing only changes of commit e844ac23f4 - Show all commits

View File

@ -44,15 +44,14 @@ class Handler(npyscreen.ButtonPress):
# Localize the player
player = self.parent.parentApp.player
roomlocation = player.playerData['player']['location'] + '.yaml'
roomlocation = player.playerData['player']['location']
try:
room = parse(self.parent.parentApp.mainPath / 'gamedata/world' / roomlocation)['room']
# If the file could not be found
except FileNotFoundError:
# Log a critical error!
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.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')

View File

@ -7,5 +7,9 @@ room:
inspect: "Its still a closet door."
open: "You cant open this door."
desk:
look_at: "Its your receptionists desks, she's not sitting behind it."
look_at: "Its your receptionists desk, she's not sitting behind it."
inspect: "She's still not there."
door:
leads_to: office.yaml
look_at: "Its a door, it leads to your office. You should try to |OPEN| it."
inspect: "Its ornate but basic, this side of the door has your name on a plaque."

View File

@ -1,4 +1,4 @@
player:
name: 'Default'
location: 'office'
location: 'office.yaml'
inventory: ['test', 'test2']