comparison gamelib/scenes/game_widgets.py @ 544:f79d1d3df8e8

pep8 cleanup
author Neil Muller <neil@dip.sun.ac.za>
date Sat, 11 Feb 2012 12:31:33 +0200
parents 821b322e903b
children 098ea4ea0d0d
comparison
equal deleted inserted replaced
543:60d34f036efd 544:f79d1d3df8e8
47 def get_description(self): 47 def get_description(self):
48 status = self.state.scenes['bridge'].get_data('ai status') 48 status = self.state.scenes['bridge'].get_data('ai status')
49 if status == 'online': 49 if status == 'online':
50 return "A security camera watches over the room" 50 return "A security camera watches over the room"
51 elif status == 'looping': 51 elif status == 'looping':
52 return "The security camera is currently offline but should be working soon" 52 return "The security camera is currently offline but should be" \
53 " working soon"
53 else: 54 else:
54 return "The security camera is powered down" 55 return "The security camera is powered down"
55 56
56 def is_interactive(self, tool=None): 57 def is_interactive(self, tool=None):
57 return self.state.scenes['bridge'].get_data('ai status') == 'online' 58 return self.state.scenes['bridge'].get_data('ai status') == 'online'
58 59
59 def interact_with_escher_poster(self, item): 60 def interact_with_escher_poster(self, item):
60 # Order matters here, because of helper function 61 # Order matters here, because of helper function
61 if self.state.scenes['bridge'].get_data('ai status') == 'online': 62 if self.state.scenes['bridge'].get_data('ai status') == 'online':
62 ai_response = make_jim_dialog("3D scene reconstruction failed. Critical error. Entering emergency shutdown.", self.state) 63 ai_response = make_jim_dialog("3D scene reconstruction failed."
64 " Critical error. Entering emergency shutdown.",
65 self.state)
63 self.state.scenes['bridge'].set_data('ai status', 'looping') 66 self.state.scenes['bridge'].set_data('ai status', 'looping')
64 return ai_response 67 return ai_response
65 68
66 def animate(self): 69 def animate(self):
67 ai_status = self.state.scenes['bridge'].get_data('ai status') 70 ai_status = self.state.scenes['bridge'].get_data('ai status')
68 if ai_status != self.get_data('status'): 71 if ai_status != self.get_data('status'):
69 self.set_data('status', ai_status) 72 self.set_data('status', ai_status)
70 self.set_interact(ai_status) 73 self.set_interact(ai_status)
71 super(BaseCamera, self).animate() 74 super(BaseCamera, self).animate()
72