changeset 499:cfd9c2bb4474

Make poster only work if JIM is online
author Neil Muller <neil@dip.sun.ac.za>
date Tue, 31 Aug 2010 14:25:09 +0200
parents 168e9424fe91
children e49e4fe76241
files gamelib/scenes/scene_widgets.py
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/scenes/scene_widgets.py	Mon Aug 30 00:16:14 2010 +0200
+++ b/gamelib/scenes/scene_widgets.py	Tue Aug 31 14:25:09 2010 +0200
@@ -184,21 +184,22 @@
 
 class BaseCamera(Thing):
     "Base class for the camera puzzles"
- 
+
     INITIAL = 'online'
     INITIAL_DATA = {
          'state': 'online',
     }
- 
+
     def get_description(self):
         return "A security camera watches over the room"
- 
+
     def interact_with_escher_poster(self, item):
         # Order matters here, because of helper function
-        ai_response = make_jim_dialog("3D scene reconstruction failed. Critical error. Entering emergency shutdown.", self.state)
-        self.state.scenes['bridge'].set_data('ai status', 'looping')
-        return ai_response
- 
+        if self.state.scenes['bridge'].get_data('ai status') == 'online':
+            ai_response = make_jim_dialog("3D scene reconstruction failed. Critical error. Entering emergency shutdown.", self.state)
+            self.state.scenes['bridge'].set_data('ai status', 'looping')
+            return ai_response
+
     def animate(self):
         ai_status = self.state.scenes['bridge'].get_data('ai status')
         if ai_status != self.get_data('status'):