diff gamelib/scenes/cryo.py @ 247:0bad554d0926

More tests, some cryo room fixes and docs in the build.
author Jeremy Thurgood <firxen@gmail.com>
date Fri, 27 Aug 2010 13:32:27 +0200
parents 12c4f87ea424
children dfc89bc64fdb
line wrap: on
line diff
--- a/gamelib/scenes/cryo.py	Fri Aug 27 13:25:42 2010 +0200
+++ b/gamelib/scenes/cryo.py	Fri Aug 27 13:32:27 2010 +0200
@@ -164,20 +164,27 @@
         }
 
     def interact_with_machete(self, item):
-        self.set_data('fixed', False)
-        pipe = CryoPipe('cryopipe')
-        self.state.add_item(pipe)
-        self.state.add_inventory_item(pipe.name)
-        self.set_interact("chopped")
+        if self.get_data('fixed'):
+            self.set_data('fixed', False)
+            pipe = CryoPipe('cryo_pipe')
+            self.state.add_item(pipe)
+            self.state.add_inventory_item(pipe.name)
+            self.set_interact("chopped")
+            return Result("It takes more effort than one would expect, but "
+                          "eventually the pipe is separated from the wall.")
 
     def is_interactive(self):
         return self.get_data('fixed')
 
+    def interact_without(self):
+        if self.get_data('fixed'):
+            return Result("These pipes aren't attached to the wall very solidly.")
+        return None
+
     def get_description(self):
         if self.get_data('fixed'):
             return "These pipes carry cooling fluid to the cryo units."
-        else:
-            return "There used to be a pipe carrying cooling fuild here"
+        return "There used to be a pipe carrying cooling fluid here"
 
 
 class CryoPipe(CloneableItem):