adventure-game #3
|
@ -34,7 +34,7 @@ class GameNavigator(npyscreen.FormBaseNew):
|
||||||
This may not be needed in the future, dynamic
|
This may not be needed in the future, dynamic
|
||||||
handling of location is something the navigator should do and should inherit from player.
|
handling of location is something the navigator should do and should inherit from player.
|
||||||
"""
|
"""
|
||||||
pass
|
self.artBox.footer = location
|
||||||
|
|
||||||
def create(self):
|
def create(self):
|
||||||
top_division_height = 20
|
top_division_height = 20
|
||||||
|
@ -58,7 +58,7 @@ class GameNavigator(npyscreen.FormBaseNew):
|
||||||
editable=False)
|
editable=False)
|
||||||
self.artBox.footer = 'Unknown Location'
|
self.artBox.footer = 'Unknown Location'
|
||||||
|
|
||||||
self.artBox = self.add(npyscreen.BoxBasic,
|
self.inventoryBox = self.add(npyscreen.BoxBasic,
|
||||||
name='Inventory',
|
name='Inventory',
|
||||||
max_width=inventory_width,
|
max_width=inventory_width,
|
||||||
max_height=top_division_height,
|
max_height=top_division_height,
|
||||||
|
@ -114,4 +114,5 @@ class GameNavigator(npyscreen.FormBaseNew):
|
||||||
# TODO: Expand this by loding the text from the game
|
# 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
|
# 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('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
|
# Put the player in a blank room i forgot to finish
|
||||||
room = parse(self.parent.parentApp.mainPath / 'gamedata/world/blank_room.yaml')
|
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.
|
# 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!
|
# self.parent.parentApp.log.debug(room) # We dont need to log this, its too verbose!
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
room:
|
room:
|
||||||
|
name: "Your Office"
|
||||||
grid: [0, 0]
|
grid: [0, 0]
|
||||||
upon_enter: "You are standing behind your desk, you see a |NAMEPLATE|, a |TAPE RECORDER| and your trusty |LOG VIEWER|"
|
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|"
|
look_around: "You look around the room, you see a |DESK|, a |BOOKSHELF| and the |DOOR|"
|
||||||
|
|
Loading…
Reference in New Issue