# HG changeset patch # User Neil Muller # Date 1282892780 -7200 # Node ID ae01c10497b35ad74143c1fe100e9d86add255a0 # Parent f82f017db104834b3fc607ea831689131b58715e Start work on bridge comp detail diff -r f82f017db104 -r ae01c10497b3 Resources/images/bridge/comp_detail_1.png Binary file Resources/images/bridge/comp_detail_1.png has changed diff -r f82f017db104 -r ae01c10497b3 gamelib/scenes/bridge.py --- a/gamelib/scenes/bridge.py Fri Aug 27 09:06:06 2010 +0200 +++ b/gamelib/scenes/bridge.py Fri Aug 27 09:06:20 2010 +0200 @@ -3,6 +3,7 @@ from gamelib.cursor import CursorSprite from gamelib.state import Scene, Item, Thing, Result, InteractText, \ InteractNoImage, InteractRectUnion +from gamelib.statehelpers import GenericDescThing class Bridge(Scene): @@ -20,6 +21,7 @@ self.add_thing(ToMap()) self.add_thing(MassageChair()) self.add_thing(StethoscopeThing()) + self.add_thing(BridgeComputer()) def enter(self): return Result("The bridge is in a sorry, shabby state") @@ -42,6 +44,30 @@ self.state.set_current_scene("map") +class BridgeComputer(Thing): + """The bridge computer. Gives status updates""" + + NAME = "bridge.comp" + + INTERACTS = { + 'screen' : InteractNoImage(338, 296, 123, 74), + } + + INITIAL = 'screen' + + def interact_without(self): + return Result(detail_view='bridge_comp_detail') + + def interact_with_titanium_leg(self): + return Result("You can't break the duraplastic screen.") + + def interact_with_machete(self): + return Result("Scratching the screen won't help you.") + + def get_description(self): + return "The main bridge computer screen." + + class MassageChair(Thing): "The captain's massage chair, contains superconductor" @@ -133,6 +159,17 @@ super(ChairDetail, self).__init__(state) self.add_thing(SuperconductorThing()) +class BridgeCompDetail(Scene): + + FOLDER = 'bridge' + BACKGROUND = 'comp_detail_1.png' + NAME = 'bridge_comp_detail' + + SIZE = (300, 300) + + def __init__(self, state): + super(BridgeCompDetail, self).__init__(state) + SCENES = [Bridge] -DETAIL_VIEWS = [ChairDetail] +DETAIL_VIEWS = [ChairDetail, BridgeCompDetail]