Mercurial > boomslang
view gamelib/scenes/map.py @ 130:11afefc4aeaf
InteractText for mocking up scenes. Allow backgrounds to be None. Mock up map.
author | Simon Cross <hodgestar+bzr@gmail.com> |
---|---|
date | Tue, 24 Aug 2010 18:38:44 +0200 |
parents | 3417cf0e8795 |
children | 97c5ff0a05bb |
line wrap: on
line source
"""Neurally implanted schematic for moving around on the ship. It is illegal for prisoners in transit to activate such an implant. Failure to comply carries a minimum sentence of six months. Many parts of the ship are derelict and inaccessible. """ from gamelib.state import Scene, Item, Thing, InteractText class Map(Scene): FOLDER = "map" BACKGROUND = None # TODO INITIAL_DATA = { 'accessible': True, } def __init__(self, state): super(Map, self).__init__(state) self.add_thing(ToCryo()) self.add_thing(ToBridge()) self.add_thing(ToMess()) self.add_thing(ToEngine()) self.add_thing(ToMachine()) class ToCryo(Thing): "Way to cryo room." NAME = "map.tocryo" INTERACTS = { "room": InteractText(100, 200, "To Cryo"), } INITIAL = "room" class ToBridge(Thing): "Way to bridge room." NAME = "map.tobridge" INTERACTS = { "room": InteractText(300, 200, "To Bridge"), } INITIAL = "room" class ToMess(Thing): "Way to cryo room." NAME = "map.tomess" INTERACTS = { "room": InteractText(100, 300, "To Mess"), } INITIAL = "room" class ToEngine(Thing): "Way to engine room." NAME = "map.toengine" INTERACTS = { "room": InteractText(300, 300, "To Engine"), } INITIAL = "room" class ToMachine(Thing): "Way to machine room." NAME = "map.tomachine" INTERACTS = { "room": InteractText(100, 400, "To Machine"), } INITIAL = "room" SCENES = [Map]