# HG changeset patch # User Stefano Rivera # Date 1282996582 -7200 # Node ID 67e8a547970b5f76afbb00ad5ea3f02e21d7dfc3 # Parent bd649aa514723e964d4705ce90bc6d7ee350286d More engine room descs diff -r bd649aa51472 -r 67e8a547970b gamelib/scenes/bridge.py --- a/gamelib/scenes/bridge.py Sat Aug 28 13:33:07 2010 +0200 +++ b/gamelib/scenes/bridge.py Sat Aug 28 13:56:22 2010 +0200 @@ -137,6 +137,9 @@ "It's massaging a skeleton." return "The chair won't work any more, it has no power." + def is_interactive(self): + return False + class MassageChairBase(Thing): "The captain's massage chair, contains superconductor" diff -r bd649aa51472 -r 67e8a547970b gamelib/scenes/engine.py --- a/gamelib/scenes/engine.py Sat Aug 28 13:33:07 2010 +0200 +++ b/gamelib/scenes/engine.py Sat Aug 28 13:56:22 2010 +0200 @@ -22,35 +22,39 @@ self.add_thing(CanOpenerThing()) self.add_item(BrokenSuperconductor('superconductor_broken')) self.add_thing(SuperconductorSocket()) + self.add_thing(PowerLines()) + self.add_thing(CryoContainers()) + self.add_thing(CryoContainerReceptacle()) + self.add_thing(CoolingPipes()) self.add_thing(ToMap()) self.add_thing(GenericDescThing('engine.body', 1, - "Dead. He must have suffocated in the vacuum.", + "Dead. I think those cans were passed their sell-by date.", ( (594, 387, 45, 109), - (549, 475, 60, 55), + (549, 479, 60, 55), ) )) - self.add_thing(GenericDescThing('engine.controlpanel', 1, + self.add_thing(GenericDescThing('engine.controlpanel', 2, "A control panel. It seems dead.", ( (513, 330, 58, 50), ) )) - self.add_thing(GenericDescThing('engine.computer_console', 1, + self.add_thing(GenericDescThing('engine.computer_console', 3, "A computer console. It seems dead", ( (293, 287, 39, 36), ) )) - self.add_thing(GenericDescThing('engine.superconductors', 1, + self.add_thing(GenericDescThing('engine.superconductors', 4, "Superconductors. The engines must be power hogs.", ( (679, 246, 50, 56), - (473, 277, 28, 23), - (381, 224, 26, 22), + (473, 280, 28, 23), + (381, 224, 25, 22), ) )) - self.add_thing(GenericDescThing('engine.floor_hole', 1, + self.add_thing(GenericDescThing('engine.floor_hole', 5, "A gaping hole in the floor of the room. I'm guessing that's why there's a vacuum in here.", ( (257, 493, 141, 55), @@ -59,37 +63,62 @@ (239, 547, 123, 39), ) )) - self.add_thing(GenericDescThing('engine.cryo_containers', 1, - "Those are cryo-fluid containers. They look empty", - ( - (129, 246, 135, 160), - ) - )) - self.add_thing(GenericDescThing('engine.empty_cans', 1, - "Empty Chocolate-Covered-Bacon Cans? He must have got in early", + self.add_thing(GenericDescThing('engine.empty_cans', 7, + "Empty Chocolate-Covered-Bacon Cans? Poor guy, he must have found them unresistable.", ( (562, 422, 30, 31), ) )) - self.add_thing(GenericDescThing('engine.engines', 1, + self.add_thing(GenericDescThing('engine.engines', 8, "The engines. They don't look like they are working.", ( (342, 261, 109, 81), ) )) - self.add_thing(GenericDescThing('engine.laser_cutter', 1, + self.add_thing(GenericDescThing('engine.laser_cutter', 9, "A burned out laser cutter. It may be responsible for the hole in the floor.", ( (120, 466, 115, 67), ) )) - self.add_thing(GenericDescThing('engine.spare_fuel_line', 1, + self.add_thing(GenericDescThing('engine.fuel_lines', 10, + "The main fuel line for the engines.", + ( + (220, 49, 59, 75), + (239, 84, 51, 66), + (271, 113, 28, 53), + (285, 132, 26, 50), + (299, 153, 22, 46), + (321, 172, 167, 25), + (308, 186, 36, 22), + (326, 217, 30, 13), + (336, 229, 28, 13), + (343, 239, 21, 14), + (446, 197, 33, 11), + (424, 240, 21, 20), + (418, 249, 19, 11), + (438, 217, 30, 11), + (435, 225, 18, 15), + ) + )) + self.add_thing(GenericDescThing('engine.spare_fuel_line', 11, "The spare fuel line. If something went wrong with the main one, you would hook that one up.", ( (512, 49, 68, 44), ) )) - + self.add_thing(GenericDescThing('engine.danger_area', 12, + "The sign says DANGER. You would be wise to listen to it.", + ( + (293, 343, 211, 46), + ) + )) + self.add_thing(GenericDescThing('engine.exit_sign', 13, + "It's one of those glow-in-the-dark exit signs that you see everywhere", + ( + (681, 322, 80, 33), + ) + )) def enter(self): return Result("You enter the engine room. Even if there wasn't a vacuum " @@ -174,6 +203,133 @@ return Result("It might help to remove the broken superconductor first") +class CryoContainers(Thing): + NAME = 'engine.cryo_containers' + + INTERACTS = { + 'containers': InteractRectUnion(( + (140, 378, 40, 25), + (129, 278, 55, 100), + (130, 365, 17, 25), + (168, 288, 31, 104), + (192, 288, 27, 95), + (216, 291, 16, 87), + (226, 291, 38, 79), + )) + } + + INITIAL = 'containers' + + INITIAL_DATA = { + 'filled': False, + } + + def get_description(self): + if not self.get_data('filled'): + return "Those are coolant reservoirs. They look empty." + return "The coolant reservoirs are full." + + def is_interactive(self): + return False + + +class CryoContainerReceptacle(Thing): + NAME = 'engine.cryo_container_receptacle' + + INTERACTS = { + 'containers': InteractRectUnion(( + (132, 250, 56, 28), + (184, 258, 42, 30), + (219, 267, 42, 24), + )) + } + + INITIAL = 'containers' + + def get_description(self): + return "The receptacles for the coolant reservoirs." + + +class CoolingPipes(Thing): + NAME = 'engine.coolingpipes' + + INTERACTS = { + 'pipes': InteractRectUnion(( + (262, 209, 315, 7), + (693, 155, 14, 90), + (673, 138, 32, 27), + (649, 155, 25, 21), + (608, 177, 23, 18), + (587, 186, 25, 18), + (570, 195, 27, 20), + (625, 167, 28, 18), + (57, 86, 16, 238), + (227, 188, 31, 49), + (71, 91, 39, 36), + (108, 117, 32, 69), + (140, 135, 31, 64), + (168, 156, 33, 57), + (200, 172, 27, 55), + (105, 159, 15, 289), + (0, 309, 128, 16), + (0, 411, 44, 27), + (41, 401, 39, 24), + (79, 390, 28, 22), + (257, 209, 27, 10), + (249, 225, 26, 20), + (272, 237, 25, 17), + (294, 247, 41, 24), + (333, 254, 35, 6), + (364, 235, 7, 25), + (365, 231, 15, 13), + (121, 403, 70, 38), + (180, 392, 33, 19), + (199, 383, 30, 18), + (219, 378, 20, 10), + (232, 370, 18, 11), + )), + } + INITIAL = 'pipes' + + def get_description(self): + if not self.state.current_scene.things['engine.cryo_containers'] \ + .get_data('filled'): + return "These pipes carry coolant to the superconductors. " \ + "They feel warm." + return "These pipes carry coolant to the superconductors. " \ + "They are very cold." + + def is_interactive(self): + return False + + +class PowerLines(Thing): + NAME = 'engine.powerlines' + + INTERACTS = { + 'lines': InteractRectUnion(( + (592, 270, 87, 21), + (605, 259, 74, 14), + (502, 280, 63, 13), + (527, 272, 38, 11), + (454, 229, 38, 11), + (480, 232, 13, 45), + (407, 229, 27, 10), + )), + } + + INITIAL = 'lines' + + def get_description(self): + if self.state.current_scene.things['engine.superconductor'] \ + .get_data('fixed'): + return "Power lines. They are delivering power to the engines" + return "Power lines. It looks like they aren't working correctly" + + def is_interactive(self): + return False + + class ToMap(Door): SCENE = "engine"