view gamelib/scenes/engine.py @ 151:d00aa26941c4

Add machine and engine rooms to map. Fix typo in name of mess hall doorway thing.
author Simon Cross <hodgestar+bzr@gmail.com>
date Tue, 24 Aug 2010 23:38:04 +0200
parents 2e2f6ff54780
children 12c4f87ea424
line wrap: on
line source

"""Engine room where things need to be repaired."""

from gamelib.state import Scene, Item, Thing, InteractText, Result


class Engine(Scene):

    FOLDER = "engine"
    BACKGROUND = None # TODO

    INITIAL_DATA = {
        'accessible': True,
        }

    def __init__(self, state):
        super(Engine, self).__init__(state)
        self.add_thing(ToMap())

    def enter(self):
        return Result("Somewhere in the darkness the engine waits and bides its time.")


class ToMap(Thing):
    "Way to map."

    NAME = "engine.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 = [Engine]