diff 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 diff
--- a/gamelib/scenes/map.py	Tue Aug 24 18:36:31 2010 +0200
+++ b/gamelib/scenes/map.py	Tue Aug 24 18:38:44 2010 +0200
@@ -7,7 +7,7 @@
    Many parts of the ship are derelict and inaccessible.
    """
 
-from gamelib.state import Scene, Item, Thing
+from gamelib.state import Scene, Item, Thing, InteractText
 
 
 class Map(Scene):
@@ -19,5 +19,73 @@
         '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]