changeset 500:e49e4fe76241

Alter security camera description and is_interactive to match JIM's state
author Stefano Rivera <stefano@rivera.za.net>
date Tue, 31 Aug 2010 14:33:00 +0200
parents cfd9c2bb4474
children 096ba5fe8be1
files gamelib/scenes/scene_widgets.py
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/scenes/scene_widgets.py	Tue Aug 31 14:25:09 2010 +0200
+++ b/gamelib/scenes/scene_widgets.py	Tue Aug 31 14:33:00 2010 +0200
@@ -191,7 +191,16 @@
     }
 
     def get_description(self):
-        return "A security camera watches over the room"
+        status = self.state.scenes['bridge'].get_data('ai status')
+        if status == 'online':
+            return "A security camera watches over the room"
+        elif status == 'looping':
+            return "The security camera is currently offline but should be working soon"
+        else:
+            return "The security camera is powered down"
+
+    def is_interactive(self):
+        return self.state.scenes['bridge'].get_data('ai status') == 'online'
 
     def interact_with_escher_poster(self, item):
         # Order matters here, because of helper function