diff gamelib/scenes/engine.py @ 242:12c4f87ea424

Unify doors a bit
author Neil Muller <neil@dip.sun.ac.za>
date Fri, 27 Aug 2010 11:32:49 +0200
parents d00aa26941c4
children cc478e3a951e
line wrap: on
line diff
--- a/gamelib/scenes/engine.py	Fri Aug 27 10:37:47 2010 +0200
+++ b/gamelib/scenes/engine.py	Fri Aug 27 11:32:49 2010 +0200
@@ -1,6 +1,7 @@
 """Engine room where things need to be repaired."""
 
 from gamelib.state import Scene, Item, Thing, InteractText, Result
+from gamelib.scenes.scene_widgets import Door
 
 
 class Engine(Scene):
@@ -20,11 +21,9 @@
         return Result("Somewhere in the darkness the engine waits and bides its time.")
 
 
-class ToMap(Thing):
-    "Way to map."
+class ToMap(Door):
 
     NAME = "engine.tomap"
-    DEST = "map"
 
     INTERACTS = {
         "door": InteractText(100, 200, "To Map"),
@@ -32,9 +31,5 @@
 
     INITIAL = "door"
 
-    def interact_without(self):
-        """Go to map."""
-        self.state.set_current_scene("map")
-
 
 SCENES = [Engine]