comparison gamelib/scenes/engine.py @ 395:44459476aec6

Cryo empty and full images.
author Simon Cross <hodgestar+bzr@gmail.com>
date Sat, 28 Aug 2010 20:31:26 +0200
parents c81a4faa748e
children 1cfcd82519b6
comparison
equal deleted inserted replaced
394:5cfd68beb6d3 395:44459476aec6
209 209
210 class CryoContainers(Thing): 210 class CryoContainers(Thing):
211 NAME = 'engine.cryo_containers' 211 NAME = 'engine.cryo_containers'
212 212
213 INTERACTS = { 213 INTERACTS = {
214 'containers': InteractRectUnion(( 214 'empty': InteractImage(118, 211, 'cryo_empty.png'),
215 (140, 378, 40, 25), 215 'full': InteractImage(118, 211, 'cryo_full.png'),
216 (129, 278, 55, 100), 216 }
217 (130, 365, 17, 25), 217
218 (168, 288, 31, 104), 218 INITIAL = 'empty'
219 (192, 288, 27, 95),
220 (216, 291, 16, 87),
221 (226, 291, 38, 79),
222 ))
223 }
224
225 INITIAL = 'containers'
226 219
227 INITIAL_DATA = { 220 INITIAL_DATA = {
228 'filled': False, 221 'filled': False,
229 } 222 }
230 223
256 def interact_without(self): 249 def interact_without(self):
257 return Result("You stick your finger in the receptacle. " 250 return Result("You stick your finger in the receptacle. "
258 "It almost gets stuck") 251 "It almost gets stuck")
259 252
260 def interact_with_full_detergent_bottle(self, item): 253 def interact_with_full_detergent_bottle(self, item):
261 # TODO: Show full tank interact
262 self.state.remove_inventory_item(item.name) 254 self.state.remove_inventory_item(item.name)
263 self.state.current_scene.things['engine.cryo_containers'] \ 255 self.state.current_scene.things['engine.cryo_containers'] \
264 .set_data('filled', True) 256 .set_data('filled', True)
257 self.state.current_scene.things['engine.cryo_containers'] \
258 .set_interact('full')
265 return Result("You fill the reservoirs. " 259 return Result("You fill the reservoirs. "
266 "It seems the detergent bottle was just big enough.") 260 "It seems the detergent bottle was just big enough.")
267 261
268 262
269 class CoolingPipes(Thing): 263 class CoolingPipes(Thing):