diff gamelib/scenes/cryo.py @ 56:75bf3d3689e9

Refactor thing interactivity and add "fake" bridge scene.
author Jeremy Thurgood <firxen@gmail.com>
date Mon, 23 Aug 2010 13:39:12 +0200
parents 2e2f6ff54780
children 3087be3463e0
line wrap: on
line diff
--- a/gamelib/scenes/cryo.py	Mon Aug 23 13:27:50 2010 +0200
+++ b/gamelib/scenes/cryo.py	Mon Aug 23 13:39:12 2010 +0200
@@ -48,12 +48,6 @@
         'open': False,
         }
 
-    def interact(self, item):
-        if self.get_data('open'):
-            print "Door open"
-            return
-        Thing.interact(self, item)
-
     def interact_with_titanium_leg(self, item):
         self.message("You wedge the titanium leg into the chain and twist. With a satisfying *snap*, the chain breaks and the door opens.")
         self.open_door()
@@ -68,6 +62,9 @@
                     "The door resists. Try something else, perhaps?",
                     ]))
 
+    def is_interactive(self):
+        return not self.get_data('open')
+
     def open_door(self):
         self.set_data('open', True)
         self.state.scenes['bridge'].set_data('accessible', True)