# HG changeset patch # User Stefano Rivera # Date 1283005120 -7200 # Node ID b61dccc7fb422138e89932c87f0d7d352b90a096 # Parent 88c1a59b05448ac3b92c5f5a754c46ae0c2ffad2 Detergent + cryo fluid puzzle (currently triangular) diff -r 88c1a59b0544 -r b61dccc7fb42 gamelib/scenes/cryo.py --- a/gamelib/scenes/cryo.py Sat Aug 28 15:53:56 2010 +0200 +++ b/gamelib/scenes/cryo.py Sat Aug 28 16:18:40 2010 +0200 @@ -43,6 +43,7 @@ self.add_thing(CryoPipeLeft()) self.add_thing(CryoPipeRightTop()) self.add_thing(CryoPipeRightBottom()) + self.add_thing(CryoPools()) # Flavour items # pipes @@ -60,14 +61,6 @@ ))) self.add_thing(UncuttableCryoPipes()) - # leaks - self.add_thing(GenericDescThing('cryo.leaks', 2, - "Fluid leaks disturbingly from the bulkheads", - ( - (444, 216, 125, 67), - (44, 133, 74, 107), - ))) - # cryo units self.add_thing(GenericCryoUnit(2, "An empty cryo chamber.", @@ -423,6 +416,7 @@ def get_description(self): return "This femur looks synthetic." + class PlaqueThing(Thing): "Plaque on the detailed cryo chamber" @@ -440,6 +434,40 @@ def get_description(self): return "'Prisoner 98cc-764e646391ee. War crimes. 45 years." + +class FullBottle(Item): + INVENTORY_IMAGE = 'triangle.png' + CURSOR = CursorSprite('triangle.png') + + +class CryoPools(Thing): + "Handy for cooling engines" + + NAME = 'cryo.pool' + + INTERACTS = { + 'pools': InteractRectUnion(( + (444, 216, 125, 67), + (44, 133, 74, 107), + (485, 396, 97, 34), + )), + } + + INITIAL = 'pools' + + def get_description(self): + return "Coolant leaks disturbingly from the bulkheads" + + def interact_without(self): + return Result("It's gooey") + + def interact_with_detergent_bottle(self, item): + full = FullBottle('full_detergent_bottle') + self.state.add_item(full) + self.state.replace_inventory_item(item.name, full.name) + return Result("You scoop up some coolant and fill the bottle") + + class CryoCompDetail(Scene): FOLDER = "cryo" diff -r 88c1a59b0544 -r b61dccc7fb42 gamelib/scenes/engine.py --- a/gamelib/scenes/engine.py Sat Aug 28 15:53:56 2010 +0200 +++ b/gamelib/scenes/engine.py Sat Aug 28 16:18:40 2010 +0200 @@ -249,6 +249,18 @@ def get_description(self): return "The receptacles for the coolant reservoirs." + def interact_without(self): + return Result("You stick your finger in the receptacle. " + "It almost gets stuck") + + def interact_with_full_detergent_bottle(self, item): + # TODO: Show full tank interact + self.state.remove_inventory_item(item.name) + self.state.current_scene.things['engine.cryo_containers'] \ + .set_data('filled', True) + return Result("You fill the reservoirs. " + "It seems the detergent bottle was just big enough") + class CoolingPipes(Thing): NAME = 'engine.coolingpipes'