Handler can load the current room!
This commit is contained in:
parent
6c162e42b4
commit
56f3fb2fee
|
@ -1,5 +1,7 @@
|
|||
import npyscreen
|
||||
|
||||
from yaml_parser import parse_datafile as parse
|
||||
|
||||
|
||||
class Handler(npyscreen.ButtonPress):
|
||||
"""
|
||||
|
@ -40,7 +42,8 @@ class Handler(npyscreen.ButtonPress):
|
|||
|
||||
# Localize the player
|
||||
player = self.parent.parentApp.player
|
||||
room = player.playerData['player']['location'] # This is ugly, and should point to the room's name and not the system name
|
||||
roomlocation = player.playerData['player']['location'] + '.yaml'
|
||||
room = parse(self.parent.parentApp.mainPath / 'gamedata/world' / roomlocation)
|
||||
self.parent.update_log('You are in {0}.'.format(room))
|
||||
|
||||
# Log the command that we parsed
|
||||
|
|
Loading…
Reference in New Issue