Mercurial > pyntnclick
annotate gamelib/scenes/crew_quarters.py @ 462:eebd6e08cbc9
Mac icons hooked up, chops added and engine fix message fixed.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Sun, 29 Aug 2010 01:23:08 +0200 |
parents | 7907cd46c206 |
children | 54853e61b149 |
rev | line source |
---|---|
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
1 """Crew quarters.""" |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
2 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
3 from gamelib.cursor import CursorSprite |
263
3b4a78422201
Shuffled a bunch of stuff into more appropriate places.
Jeremy Thurgood <firxen@gmail.com>
parents:
252
diff
changeset
|
4 from gamelib.state import Scene, Item, Thing, Result |
359
6b94f549443b
JIM comments on safe opening, if able
Neil Muller <neil@dip.sun.ac.za>
parents:
355
diff
changeset
|
5 |
6b94f549443b
JIM comments on safe opening, if able
Neil Muller <neil@dip.sun.ac.za>
parents:
355
diff
changeset
|
6 from gamelib.scenes.game_constants import PLAYER_ID |
263
3b4a78422201
Shuffled a bunch of stuff into more appropriate places.
Jeremy Thurgood <firxen@gmail.com>
parents:
252
diff
changeset
|
7 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage, |
3b4a78422201
Shuffled a bunch of stuff into more appropriate places.
Jeremy Thurgood <firxen@gmail.com>
parents:
252
diff
changeset
|
8 InteractRectUnion, InteractImage, |
350
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
9 InteractAnimated, GenericDescThing, |
360
452230d78541
Use make_jim_dialog everywhere
Neil Muller <neil@dip.sun.ac.za>
parents:
359
diff
changeset
|
10 BaseCamera, make_jim_dialog) |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
11 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
12 class CrewQuarters(Scene): |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
13 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
14 FOLDER = "crew_quarters" |
275
d78ce15bccc8
Crew quarters background and toolbar on the rect tool.
Jeremy Thurgood <firxen@gmail.com>
parents:
263
diff
changeset
|
15 BACKGROUND = "crew_quarters.png" |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
16 |
283
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
17 OFFSET = (0, -50) |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
18 |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
19 INITIAL_DATA = { |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
20 'accessible': True, |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
21 } |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
22 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
23 def __init__(self, state): |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
24 super(CrewQuarters, self).__init__(state) |
242 | 25 self.add_thing(ToMap()) |
287
2a11709cb427
Hook up a few things in the crew quarters
Neil Muller <neil@dip.sun.ac.za>
parents:
283
diff
changeset
|
26 self.add_thing(Safe()) |
283
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
27 self.add_thing(FishbowlThing()) |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
28 self.add_item(Fishbowl('fishbowl')) |
288
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
29 self.add_item(DuctTape('duct_tape')) |
350
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
30 self.add_item(EscherPoster('escher_poster')) |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
31 self.add_thing(PosterThing()) |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
32 self.add_thing(MonitorCamera()) |
287
2a11709cb427
Hook up a few things in the crew quarters
Neil Muller <neil@dip.sun.ac.za>
parents:
283
diff
changeset
|
33 self.add_thing(GenericDescThing('crew.plant', 1, |
2a11709cb427
Hook up a few things in the crew quarters
Neil Muller <neil@dip.sun.ac.za>
parents:
283
diff
changeset
|
34 "The plant is doing surprisingly well for centuries of neglect", |
2a11709cb427
Hook up a few things in the crew quarters
Neil Muller <neil@dip.sun.ac.za>
parents:
283
diff
changeset
|
35 ((624, 215, 61, 108),))) |
2a11709cb427
Hook up a few things in the crew quarters
Neil Muller <neil@dip.sun.ac.za>
parents:
283
diff
changeset
|
36 self.add_thing(GenericDescThing('crew.cat', 2, |
2a11709cb427
Hook up a few things in the crew quarters
Neil Muller <neil@dip.sun.ac.za>
parents:
283
diff
changeset
|
37 "A picture of a cat labelled 'Clementine'", |
2a11709cb427
Hook up a few things in the crew quarters
Neil Muller <neil@dip.sun.ac.za>
parents:
283
diff
changeset
|
38 ((722, 382, 66, 72),))) |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
39 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
40 |
242 | 41 class ToMap(Door): |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
42 |
355
bfb6c682b4fb
Updated walkthrough test as far as completed environmental puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
350
diff
changeset
|
43 SCENE = "crew_quarters" |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
44 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
45 INTERACTS = { |
287
2a11709cb427
Hook up a few things in the crew quarters
Neil Muller <neil@dip.sun.ac.za>
parents:
283
diff
changeset
|
46 "door": InteractNoImage(233, 252, 125, 181), |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
47 } |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
48 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
49 INITIAL = "door" |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
50 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
51 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
52 class Safe(Thing): |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
53 "A safe, for keeping things safe." |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
54 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
55 NAME = 'crew.safe' |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
56 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
57 INTERACTS = { |
287
2a11709cb427
Hook up a few things in the crew quarters
Neil Muller <neil@dip.sun.ac.za>
parents:
283
diff
changeset
|
58 'safe': InteractNoImage(447, 238, 72, 73), |
288
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
59 'full_safe': InteractImage(445, 227, 'open_safe_full.png'), |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
60 'empty_safe': InteractImage(445, 227, 'open_safe_empty.png'), |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
61 } |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
62 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
63 INITIAL = 'safe' |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
64 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
65 INITIAL_DATA = { |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
66 'is_cracked': False, |
288
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
67 'has_tape': True, |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
68 } |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
69 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
70 def interact_without(self): |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
71 if self.get_data('is_cracked'): |
288
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
72 if self.get_data('has_tape'): |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
73 self.set_data('has_tape', False) |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
74 self.state.add_inventory_item('duct_tape') |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
75 self.set_interact('empty_safe') |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
76 return Result("Duct tape. It'll stick to everything except " |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
77 "ducts, apparently.") |
368 | 78 return Result("The perfectly balanced door swings frictionlessly " |
288
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
79 "to and fro. What craftsmanship!") |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
80 return Result("The safe is locked. This might be an interesting " |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
81 "challenge, if suitable equipment can be found.") |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
82 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
83 def interact_with_stethoscope(self, item): |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
84 if self.get_data('is_cracked'): |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
85 return Result("It's already unlocked. There's no more challenge.") |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
86 # TODO: Add years to the sentence for safecracking. |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
87 # TODO: Wax lyrical some more about safecracking. |
288
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
88 self.set_data('is_cracked', True) |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
89 self.set_interact('full_safe') |
362
4e939b3c73f8
Allow Nones in list of results
Neil Muller <neil@dip.sun.ac.za>
parents:
360
diff
changeset
|
90 return (Result("Even after centuries of neglect, the tumblers slide" |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
91 " almost silently into place. Turns out the combination" |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
92 " was '1 2 3 4 5'. An idiot must keep his luggage in" |
362
4e939b3c73f8
Allow Nones in list of results
Neil Muller <neil@dip.sun.ac.za>
parents:
360
diff
changeset
|
93 " here."), |
425 | 94 make_jim_dialog("Prisoner %s, you have been observed committing a felony violation. " |
368 | 95 "This will go onto your permanent record, and your sentence may be extended by up to twenty years." |
362
4e939b3c73f8
Allow Nones in list of results
Neil Muller <neil@dip.sun.ac.za>
parents:
360
diff
changeset
|
96 % PLAYER_ID, self.state)) |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
97 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
98 def get_description(self): |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
99 return "Ah, a vintage Knoxx & Co. model QR3. Quaint, but reasonably secure." |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
100 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
101 |
283
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
102 class FishbowlThing(Thing): |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
103 "A safe, for keeping things safe." |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
104 |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
105 NAME = 'crew.fishbowl' |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
106 |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
107 INTERACTS = { |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
108 'fishbowl': InteractImage(356, 495, 'fishbowl_on_table.png'), |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
109 'fish_no_bowl': InteractImage(372, 517, 'fish_minus_bowl.png'), |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
110 } |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
111 |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
112 INITIAL = 'fishbowl' |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
113 |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
114 INITIAL_DATA = { |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
115 'has_bowl': True, |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
116 } |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
117 |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
118 def interact_without(self): |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
119 if not self.get_data('has_bowl'): |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
120 return Result("What's the point of lugging around a very dead fish " |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
121 "and a kilogram or so of sand?") |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
122 self.set_interact('fish_no_bowl') |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
123 self.set_data('has_bowl', False) |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
124 self.state.add_inventory_item('fishbowl') |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
125 return Result("The fishbowl is useful, but its contents aren't.") |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
126 |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
127 def get_description(self): |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
128 return "This fishbowl looks exactly like an old science fiction space helmet." |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
129 |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
130 class Fishbowl(Item): |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
131 "A bowl. Sans fish." |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
132 |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
133 INVENTORY_IMAGE = 'fishbowl.png' |
302
6d93e04036c9
CursorSprite: Default pointer-position to the centre of the cursor
Stefano Rivera <stefano@rivera.za.net>
parents:
288
diff
changeset
|
134 CURSOR = CursorSprite('fishbowl.png') |
342
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
135 NAME = "fishbowl" |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
136 |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
137 def interact_with_duct_tape(self, item, state): |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
138 helmet = FishbowlHelmet('helmet') |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
139 state.add_item(helmet) |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
140 state.replace_inventory_item(self.name, helmet.name) |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
141 return Result("You duct tape the edges of the helmet. The seal is" |
368 | 142 " crude, but it will serve as a workable helmet if needed.") |
342
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
143 |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
144 |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
145 class FishbowlHelmet(Item): |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
146 "A bowl with duct-tape" |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
147 |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
148 INVENTORY_IMAGE = "fishbowl_helmet.png" |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
149 CURSOR = CursorSprite('fishbowl_helmet.png') |
e1cae2b61443
Add duct_tape + fishbowl = helmet
Neil Muller <neil@dip.sun.ac.za>
parents:
302
diff
changeset
|
150 NAME = "helmet" |
283
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
151 |
3ac2e025478f
Fishbowl and laser lights that don't make the universe go away.
Jeremy Thurgood <firxen@gmail.com>
parents:
275
diff
changeset
|
152 |
288
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
153 class DuctTape(Item): |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
154 "A bowl. Sans fish." |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
155 |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
156 INVENTORY_IMAGE = 'duct_tape.png' |
302
6d93e04036c9
CursorSprite: Default pointer-position to the centre of the cursor
Stefano Rivera <stefano@rivera.za.net>
parents:
288
diff
changeset
|
157 CURSOR = CursorSprite('duct_tape.png') |
288
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
158 |
13b6fbfb39aa
Plotting in the crew quarters.
Jeremy Thurgood <firxen@gmail.com>
parents:
287
diff
changeset
|
159 |
350
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
160 class MonitorCamera(BaseCamera): |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
161 "A Camera pointing to JIM" |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
162 |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
163 NAME = 'crew.camera' |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
164 |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
165 INTERACTS = { |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
166 'camera' : InteractImage(85, 97, 'camera_medium.png') |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
167 } |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
168 |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
169 |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
170 class PosterThing(Thing): |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
171 "A innocent poster on the wall" |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
172 |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
173 NAME = 'crew.poster' |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
174 |
350
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
175 INTERACTS = { |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
176 'poster': InteractImage(29, 166, 'triangle_poster.png'), |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
177 } |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
178 |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
179 INITIAL = 'poster' |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
180 |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
181 def interact_without(self): |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
182 self.state.add_inventory_item('escher_poster') |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
183 self.scene.remove_thing(self) |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
184 return Result("This poster will go nicely on your bedroom wall.") |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
185 |
350
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
186 def get_description(self): |
368 | 187 return "A paradoxical poster hangs below the security camera." |
350
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
188 |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
189 |
350
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
190 class EscherPoster(Item): |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
191 "A confusing poster to disable JIM" |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
192 |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
193 INVENTORY_IMAGE = "triangle_poster.png" |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
194 CURSOR = CursorSprite('triangle_poster.png') |
125cb389ab90
Hook up poster. Add cameras to crew_quarters and bridge
Neil Muller <neil@dip.sun.ac.za>
parents:
342
diff
changeset
|
195 NAME = "escher_poster" |
233
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
196 |
7399b52f196f
Add a partial crew quarters (eighths?) implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
197 |
241
b1451b0b906f
Link crew quarters to map.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
233
diff
changeset
|
198 SCENES = [CrewQuarters] |