adventure-game #3
|
@ -34,7 +34,7 @@ class GameNavigator(npyscreen.FormBaseNew):
|
|||
This may not be needed in the future, dynamic
|
||||
handling of location is something the navigator should do and should inherit from player.
|
||||
"""
|
||||
pass
|
||||
self.artBox.footer = location
|
||||
|
||||
def create(self):
|
||||
top_division_height = 20
|
||||
|
@ -58,7 +58,7 @@ class GameNavigator(npyscreen.FormBaseNew):
|
|||
editable=False)
|
||||
self.artBox.footer = 'Unknown Location'
|
||||
|
||||
self.artBox = self.add(npyscreen.BoxBasic,
|
||||
self.inventoryBox = self.add(npyscreen.BoxBasic,
|
||||
name='Inventory',
|
||||
max_width=inventory_width,
|
||||
max_height=top_division_height,
|
||||
|
@ -108,10 +108,11 @@ class GameNavigator(npyscreen.FormBaseNew):
|
|||
its up to Handler.py to actually play the game, but we should
|
||||
do some basic initalization here
|
||||
"""
|
||||
#TODO: load art from the last place the player was in
|
||||
#TODO: load up inventory
|
||||
# TODO: load art from the last place the player was in
|
||||
# TODO: load up inventory
|
||||
|
||||
#TODO: Expand this by loding the text from the game
|
||||
#WARN: THIS MAY REQUIRE REWRITING HANDLER.PY TO INTALIZE THE ROOM OBJECT OUTSIDE OF HANDLER.PY
|
||||
# TODO: Expand this by loding the text from the game
|
||||
# WARN: THIS MAY REQUIRE REWRITING HANDLER.PY TO INTALIZE THE ROOM OBJECT OUTSIDE OF HANDLER.PY
|
||||
self.update_log('Welcome back! Try "LOOK AROUND" to get started.')
|
||||
self.update_log('>>Note from joe: Welcome! you\'re playing the demo! Please dont mind text issues like |this| and *this*\ni have yet to implement color!')
|
||||
self.update_log(
|
||||
'>>Note from joe: Welcome! you\'re playing the demo! Please dont mind text issues like |this| and *this*\ni have yet to implement color!')
|
||||
|
|
|
@ -57,6 +57,12 @@ class Handler(npyscreen.ButtonPress):
|
|||
# Put the player in a blank room i forgot to finish
|
||||
room = parse(self.parent.parentApp.mainPath / 'gamedata/world/blank_room.yaml')
|
||||
|
||||
# This sets the footer text in the art window
|
||||
try:
|
||||
self.parent.update_location(room['name'])
|
||||
except KeyError:
|
||||
self.parent.update_location('Unknown Location')
|
||||
|
||||
# By now we should be situated in our room, and with our player.
|
||||
# self.parent.parentApp.log.debug(room) # We dont need to log this, its too verbose!
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
room:
|
||||
name: "Your Office"
|
||||
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|"
|
||||
|
|
Loading…
Reference in New Issue