diff gamelib/scenes/machine.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 366c8fe16697
children dfc89bc64fdb
line wrap: on
line diff
--- a/gamelib/scenes/machine.py	Fri Aug 27 10:37:47 2010 +0200
+++ b/gamelib/scenes/machine.py	Fri Aug 27 11:32:49 2010 +0200
@@ -2,6 +2,7 @@
 
 from gamelib.state import Scene, Item, Thing, InteractText, Result
 from gamelib.cursor import CursorSprite
+from gamelib.scenes.scene_widgets import Door
 
 
 class Machine(Scene):
@@ -25,11 +26,9 @@
         return Result("The machine room is dark and forbidding.")
 
 
-class ToMap(Thing):
-    "Way to map."
+class ToMap(Door):
 
     NAME = "machine.tomap"
-    DEST = "map"
 
     INTERACTS = {
         "door": InteractText(100, 200, "To Map"),
@@ -37,10 +36,6 @@
 
     INITIAL = "door"
 
-    def interact_without(self):
-        """Go to map."""
-        self.state.set_current_scene("map")
-
 
 class LaserWelder(Thing):