comparison gamelib/scenes/scene_widgets.py @ 519:8f3c82c685a4

Fix is_interactive() by adding tool param.
author Jeremy Thurgood <firxen@gmail.com>
date Tue, 07 Sep 2010 18:13:35 +0200
parents e49e4fe76241
children
comparison
equal deleted inserted replaced
518:3e91c82c2240 519:8f3c82c685a4
144 self._interact_hilight_color = Color(THECOLORS.keys()[number]) 144 self._interact_hilight_color = Color(THECOLORS.keys()[number])
145 145
146 def get_description(self): 146 def get_description(self):
147 return self.description 147 return self.description
148 148
149 def is_interactive(self): 149 def is_interactive(self, tool=None):
150 return False 150 return False
151 151
152 152
153 class Door(Thing): 153 class Door(Thing):
154 """A door somewhere""" 154 """A door somewhere"""
158 158
159 def __init__(self): 159 def __init__(self):
160 self.NAME = self.SCENE + '.door' 160 self.NAME = self.SCENE + '.door'
161 Thing.__init__(self) 161 Thing.__init__(self)
162 162
163 def is_interactive(self): 163 def is_interactive(self, tool=None):
164 return True 164 return True
165 165
166 def interact_without(self): 166 def interact_without(self):
167 """Go to map.""" 167 """Go to map."""
168 self.state.set_current_scene("map") 168 self.state.set_current_scene("map")
197 elif status == 'looping': 197 elif status == 'looping':
198 return "The security camera is currently offline but should be working soon" 198 return "The security camera is currently offline but should be working soon"
199 else: 199 else:
200 return "The security camera is powered down" 200 return "The security camera is powered down"
201 201
202 def is_interactive(self): 202 def is_interactive(self, tool=None):
203 return self.state.scenes['bridge'].get_data('ai status') == 'online' 203 return self.state.scenes['bridge'].get_data('ai status') == 'online'
204 204
205 def interact_with_escher_poster(self, item): 205 def interact_with_escher_poster(self, item):
206 # Order matters here, because of helper function 206 # Order matters here, because of helper function
207 if self.state.scenes['bridge'].get_data('ai status') == 'online': 207 if self.state.scenes['bridge'].get_data('ai status') == 'online':