Mercurial > pyntnclick
view gamelib/scenes/machine.py @ 158:7a21a594ad57
r150 Screenshot
author | Stefano Rivera <stefano@rivera.za.net> |
---|---|
date | Wed, 25 Aug 2010 00:14:55 +0200 |
parents | d00aa26941c4 |
children | 30f2308c1efc |
line wrap: on
line source
"""Machine room where tools and machines are found.""" from gamelib.state import Scene, Item, Thing, InteractText, Result class Machine(Scene): FOLDER = "machine" BACKGROUND = None # TODO INITIAL_DATA = { 'accessible': True, } def __init__(self, state): super(Machine, self).__init__(state) self.add_thing(ToMap()) def enter(self): return Result("The machine room is dark and forbidding.") class ToMap(Thing): "Way to map." NAME = "machine.tomap" DEST = "map" INTERACTS = { "door": InteractText(100, 200, "To Map"), } INITIAL = "door" def interact_without(self): """Go to map.""" self.state.set_current_scene("map") SCENES = [Machine]