view gamelib/scenes/bridge.py @ 150:5e5d71e40e54

Add bridge and mess to map and ways back.
author Simon Cross <hodgestar+bzr@gmail.com>
date Tue, 24 Aug 2010 23:32:05 +0200
parents 48d24a48d0ce
children b03debaec72d
line wrap: on
line source

"""Bridge where the final showdown with the AI occurs."""

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


class Bridge(Scene):

    FOLDER = "bridge"
    BACKGROUND = None # TODO

    INITIAL_DATA = {
        'accessible': True,
        }

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

    def enter(self):
        return Result("The bridge is in a sorry, shabby state")


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

    NAME = "bridge.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 = [Bridge]