comparison gamelib/scenes/engine.py @ 369:8a288db78f40

speling
author Adrianna Pińska <adrianna.pinska@gmail.com>
date Sat, 28 Aug 2010 17:36:40 +0200
parents a95bfba3acd5
children 998691a739cf
comparison
equal deleted inserted replaced
368:a95bfba3acd5 369:8a288db78f40
29 self.add_thing(ArrowsTopLeft()) 29 self.add_thing(ArrowsTopLeft())
30 self.add_thing(ArrowsBottomLeft()) 30 self.add_thing(ArrowsBottomLeft())
31 self.add_thing(ArrowsRight()) 31 self.add_thing(ArrowsRight())
32 self.add_thing(ToMap()) 32 self.add_thing(ToMap())
33 self.add_thing(GenericDescThing('engine.body', 1, 33 self.add_thing(GenericDescThing('engine.body', 1,
34 "Dead. I think those cans were passed their sell-by date.", 34 "Dead. I think those cans were past their sell-by date.",
35 ( 35 (
36 (594, 387, 45, 109), 36 (594, 387, 45, 109),
37 (549, 479, 60, 55), 37 (549, 479, 60, 55),
38 ) 38 )
39 )) 39 ))
42 ( 42 (
43 (513, 330, 58, 50), 43 (513, 330, 58, 50),
44 ) 44 )
45 )) 45 ))
46 self.add_thing(GenericDescThing('engine.computer_console', 3, 46 self.add_thing(GenericDescThing('engine.computer_console', 3,
47 "A computer console. It seems dead", 47 "A computer console. It seems dead.",
48 ( 48 (
49 (293, 287, 39, 36), 49 (293, 287, 39, 36),
50 ) 50 )
51 )) 51 ))
52 self.add_thing(GenericDescThing('engine.superconductors', 4, 52 self.add_thing(GenericDescThing('engine.superconductors', 4,
65 (377, 422, 19, 29), 65 (377, 422, 19, 29),
66 (239, 547, 123, 39), 66 (239, 547, 123, 39),
67 ) 67 )
68 )) 68 ))
69 self.add_thing(GenericDescThing('engine.empty_cans', 7, 69 self.add_thing(GenericDescThing('engine.empty_cans', 7,
70 "Empty Chocolate-Covered-Bacon Cans? Poor guy, he must have found them irresistible.", 70 "Empty chocolate-covered bacon cans? Poor guy, he must have found them irresistible.",
71 ( 71 (
72 (562, 422, 30, 31), 72 (562, 422, 30, 31),
73 ) 73 )
74 )) 74 ))
75 self.add_thing(GenericDescThing('engine.engines', 8, 75 self.add_thing(GenericDescThing('engine.engines', 8,
77 ( 77 (
78 (342, 261, 109, 81), 78 (342, 261, 109, 81),
79 ) 79 )
80 )) 80 ))
81 self.add_thing(GenericDescThing('engine.laser_cutter', 9, 81 self.add_thing(GenericDescThing('engine.laser_cutter', 9,
82 "A burned out laser cutter. It may be responsible for the hole in the floor.", 82 "A burned-out laser cutter. It may be responsible for the hole in the floor.",
83 ( 83 (
84 (120, 466, 115, 67), 84 (120, 466, 115, 67),
85 ) 85 )
86 )) 86 ))
87 self.add_thing(GenericDescThing('engine.fuel_lines', 10, 87 self.add_thing(GenericDescThing('engine.fuel_lines', 10,
115 ( 115 (
116 (293, 343, 211, 46), 116 (293, 343, 211, 46),
117 ) 117 )
118 )) 118 ))
119 self.add_thing(GenericDescThing('engine.exit_sign', 13, 119 self.add_thing(GenericDescThing('engine.exit_sign', 13,
120 "It's one of those glow-in-the-dark exit signs that you see everywhere", 120 "It's one of those glow-in-the-dark exit signs that you see everywhere.",
121 ( 121 (
122 (681, 322, 80, 33), 122 (681, 322, 80, 33),
123 ) 123 )
124 )) 124 ))
125 125
126 def enter(self): 126 def enter(self):
127 return Result("You enter the engine room. Even if there wasn't a vacuum " 127 return Result("You enter the engine room. Even if there wasn't a vacuum "
128 "it would be errily quiet.") 128 "it would be eerily quiet.")
129 129
130 class CanOpener(Item): 130 class CanOpener(Item):
131 INVENTORY_IMAGE = 'can_opener.png' 131 INVENTORY_IMAGE = 'can_opener.png'
132 CURSOR = CursorSprite('can_opener_cursor.png') 132 CURSOR = CursorSprite('can_opener_cursor.png')
133 133
145 return "A can opener. Looks like you won't be starving" 145 return "A can opener. Looks like you won't be starving"
146 146
147 def interact_without(self): 147 def interact_without(self):
148 self.state.add_inventory_item('canopener') 148 self.state.add_inventory_item('canopener')
149 self.scene.remove_thing(self) 149 self.scene.remove_thing(self)
150 return Result("You pick up the can opener. It looks brand new, " 150 return Result("You pick up the can opener. It looks brand new; "
151 "the vacuum has kept it in perfect condition.") 151 "the vacuum has kept it in perfect condition.")
152 152
153 153
154 class BrokenSuperconductor(Item): 154 class BrokenSuperconductor(Item):
155 INVENTORY_IMAGE = 'superconductor_broken.png' 155 INVENTORY_IMAGE = 'superconductor_broken.png'
182 182
183 def interact_without(self): 183 def interact_without(self):
184 if self.get_data('present') and not self.get_data('working'): 184 if self.get_data('present') and not self.get_data('working'):
185 return Result("It's wedged in there pretty firmly, it won't come out.") 185 return Result("It's wedged in there pretty firmly, it won't come out.")
186 elif self.get_data('working'): 186 elif self.get_data('working'):
187 return Result("You decide that working engines are more important than having a shiny superconductor") 187 return Result("You decide that working engines are more important than having a shiny superconductor.")
188 Thing.interact_without() 188 Thing.interact_without()
189 189
190 def interact_with_machete(self, item): 190 def interact_with_machete(self, item):
191 if self.get_data('present') and not self.get_data('working'): 191 if self.get_data('present') and not self.get_data('working'):
192 self.set_interact('removed') 192 self.set_interact('removed')
260 # TODO: Show full tank interact 260 # TODO: Show full tank interact
261 self.state.remove_inventory_item(item.name) 261 self.state.remove_inventory_item(item.name)
262 self.state.current_scene.things['engine.cryo_containers'] \ 262 self.state.current_scene.things['engine.cryo_containers'] \
263 .set_data('filled', True) 263 .set_data('filled', True)
264 return Result("You fill the reservoirs. " 264 return Result("You fill the reservoirs. "
265 "It seems the detergent bottle was just big enough") 265 "It seems the detergent bottle was just big enough.")
266 266
267 267
268 class CoolingPipes(Thing): 268 class CoolingPipes(Thing):
269 NAME = 'engine.coolingpipes' 269 NAME = 'engine.coolingpipes'
270 270
336 INITIAL = 'lines' 336 INITIAL = 'lines'
337 337
338 def get_description(self): 338 def get_description(self):
339 if self.state.current_scene.things['engine.superconductor'] \ 339 if self.state.current_scene.things['engine.superconductor'] \
340 .get_data('fixed'): 340 .get_data('fixed'):
341 return "Power lines. They are delivering power to the engines" 341 return "Power lines. They are delivering power to the engines."
342 return "Power lines. It looks like they aren't working correctly" 342 return "Power lines. It looks like they aren't working correctly."
343 343
344 def is_interactive(self): 344 def is_interactive(self):
345 return False 345 return False
346 346
347 347