adventure-game #3
|
@ -1,5 +1,7 @@
|
||||||
import npyscreen
|
import npyscreen
|
||||||
|
|
||||||
|
from yaml_parser import parse_datafile as parse
|
||||||
|
|
||||||
|
|
||||||
class Handler(npyscreen.ButtonPress):
|
class Handler(npyscreen.ButtonPress):
|
||||||
"""
|
"""
|
||||||
|
@ -40,7 +42,8 @@ class Handler(npyscreen.ButtonPress):
|
||||||
|
|
||||||
# Localize the player
|
# Localize the player
|
||||||
player = self.parent.parentApp.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))
|
self.parent.update_log('You are in {0}.'.format(room))
|
||||||
|
|
||||||
# Log the command that we parsed
|
# Log the command that we parsed
|
||||||
|
|
Loading…
Reference in New Issue