# HG changeset patch # User Neil Muller # Date 1283257509 -7200 # Node ID cfd9c2bb4474dec0b82586cf0053dba5c21c5eb7 # Parent 168e9424fe91ca8a07317beb43ec693146d59c93 Make poster only work if JIM is online diff -r 168e9424fe91 -r cfd9c2bb4474 gamelib/scenes/scene_widgets.py --- 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'):