Mercurial > pyntnclick
annotate gamelib/scenes/cryo.py @ 247:0bad554d0926
More tests, some cryo room fixes and docs in the build.
author | Jeremy Thurgood <firxen@gmail.com> |
---|---|
date | Fri, 27 Aug 2010 13:32:27 +0200 |
parents | 12c4f87ea424 |
children | dfc89bc64fdb |
rev | line source |
---|---|
39
088a101f5b94
Add an example Thing to cryo scene.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
35
diff
changeset
|
1 """Cryo room where the prisoner starts out.""" |
088a101f5b94
Add an example Thing to cryo scene.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
35
diff
changeset
|
2 |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
3 import random |
141
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
4 from albow.music import change_playlist, get_music, PlayList |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
5 |
135 | 6 from gamelib import speech |
141
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
7 from gamelib.sound import get_sound |
135 | 8 from gamelib.cursor import CursorSprite |
219
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
9 from gamelib.state import Scene, Item, CloneableItem, Thing, Result, \ |
105
65976205fc2d
Rough Stab at basic animation support
Neil Muller <neil@dip.sun.ac.za>
parents:
103
diff
changeset
|
10 InteractImage, InteractNoImage, InteractRectUnion, \ |
65976205fc2d
Rough Stab at basic animation support
Neil Muller <neil@dip.sun.ac.za>
parents:
103
diff
changeset
|
11 InteractAnimated |
182
5cb3fbe61f75
Add genric thing with description helper class
Neil Muller <neil@dip.sun.ac.za>
parents:
180
diff
changeset
|
12 from gamelib.statehelpers import GenericDescThing |
242 | 13 from gamelib.scenes.scene_widgets import Door |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
14 from gamelib.constants import DEBUG |
212
2b820b4ba3bf
Add constant for player id. Make IDs uppercase
Neil Muller <neil@dip.sun.ac.za>
parents:
210
diff
changeset
|
15 from gamelib.scenes.game_constants import PLAYER_ID |
39
088a101f5b94
Add an example Thing to cryo scene.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
35
diff
changeset
|
16 |
28
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
17 |
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
18 class Cryo(Scene): |
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
19 |
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
20 FOLDER = "cryo" |
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
21 BACKGROUND = "cryo_room.png" |
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
22 |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
23 INITIAL_DATA = { |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
24 'accessible': True, |
120 | 25 'greet' : True |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
26 } |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
27 |
141
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
28 # sounds that will be played randomly as background noise |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
29 MUSIC = [ |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
30 'drip1.ogg', |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
31 'drip2.ogg', |
209
aeb96ca5f76c
Add more sounds to cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
202
diff
changeset
|
32 'drip3.ogg', |
141
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
33 'creaking.ogg', |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
34 'silent.ogg', |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
35 'silent.ogg', |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
36 ] |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
37 |
28
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
38 def __init__(self, state): |
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
39 super(Cryo, self).__init__(state) |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
40 self.add_item(TitaniumLeg("titanium_leg")) |
86
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
41 self.add_thing(CryoUnitAlpha()) |
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
42 self.add_thing(CryoRoomDoor()) |
89
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
43 self.add_thing(CryoComputer()) |
219
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
44 self.add_thing(CryoPipeLeft()) |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
45 self.add_thing(CryoPipeRight()) |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
46 |
183
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
47 # Flavour items |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
48 # pipes |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
49 self.add_thing(GenericDescThing('cryo.pipes', 1, |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
50 "These pipes carry cooling fluid to the cryo units.", |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
51 ( |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
52 (552, 145, 129, 66), |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
53 # (643, 199, 38, 233), |
183
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
54 (636, 82, 165, 60), |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
55 (756, 127, 52, 393), |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
56 (140, 135, 112, 73), |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
57 # (125, 192, 27, 258), |
183
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
58 (11, 63, 140, 67), |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
59 (2, 130, 44, 394), |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
60 ))) |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
61 |
183
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
62 # leaks |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
63 self.add_thing(GenericDescThing('cryo.leaks', 2, |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
64 "Fluid leaks disturbingly from the bulkheads", |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
65 ( |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
66 (444, 216, 125, 67), |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
67 (44, 133, 74, 107), |
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
68 ))) |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
69 |
183
829551aad0f1
Add some flavour descriptions
Neil Muller <neil@dip.sun.ac.za>
parents:
182
diff
changeset
|
70 # cryo units |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
71 self.add_thing(GenericCryoUnit(2, |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
72 "An empty cryo chamber.", |
212
2b820b4ba3bf
Add constant for player id. Make IDs uppercase
Neil Muller <neil@dip.sun.ac.za>
parents:
210
diff
changeset
|
73 "Prisoner 81E4-C8900480E635. Embezzlement. 20 years.", |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
74 ( |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
75 (155, 430, 50, 35), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
76 (125, 450, 60, 35), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
77 (95, 470, 60, 35), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
78 (55, 490, 60, 55), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
79 ))) |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
80 |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
81 self.add_thing(GenericCryoUnit(3, |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
82 "A working cryo chamber. The frosted glass obscures the details of the occupant.", |
212
2b820b4ba3bf
Add constant for player id. Make IDs uppercase
Neil Muller <neil@dip.sun.ac.za>
parents:
210
diff
changeset
|
83 "Prisoner 9334-CE1EB0243BAB. Murder. 40 years.", |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
84 ( |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
85 (215, 430, 50, 35), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
86 (205, 450, 50, 35), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
87 (185, 470, 50, 35), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
88 (125, 505, 80, 40), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
89 ))) |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
90 |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
91 self.add_thing(GenericCryoUnit(4, |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
92 "A broken cryo chamber. The skeleton inside has been picked clean.", |
212
2b820b4ba3bf
Add constant for player id. Make IDs uppercase
Neil Muller <neil@dip.sun.ac.za>
parents:
210
diff
changeset
|
93 "Prisoner BFBC-8BF4C6B7492B. Importing illegal alien biomatter. 15 years.", |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
94 ( |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
95 (275, 430, 50, 70), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
96 (255, 460, 50, 70), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
97 (235, 490, 50, 60), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
98 ))) |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
99 |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
100 self.add_thing(GenericCryoUnit(5, |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
101 "A working cryo chamber. The frosted glass obscures the details of the occupant.", |
212
2b820b4ba3bf
Add constant for player id. Make IDs uppercase
Neil Muller <neil@dip.sun.ac.za>
parents:
210
diff
changeset
|
102 "Prisoner B520-99495B8C41CE. Copyright infringment. 60 years.", |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
103 ( |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
104 (340, 430, 50, 70), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
105 (330, 500, 60, 50), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
106 ))) |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
107 |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
108 self.add_thing(GenericCryoUnit(6, |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
109 "An empty cryo unit. Recently filled by you.", |
212
2b820b4ba3bf
Add constant for player id. Make IDs uppercase
Neil Muller <neil@dip.sun.ac.za>
parents:
210
diff
changeset
|
110 "Prisoner %s. Safe cracker. 30 years." % PLAYER_ID, |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
111 ( |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
112 (399, 426, 70, 56), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
113 (404, 455, 69, 120), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
114 ))) |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
115 |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
116 self.add_thing(GenericCryoUnit(7, |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
117 "An empty cryo unit.", |
212
2b820b4ba3bf
Add constant for player id. Make IDs uppercase
Neil Muller <neil@dip.sun.ac.za>
parents:
210
diff
changeset
|
118 "Prisoner 83F1-CE32D3234749. Spammer. 5 years", |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
119 ( |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
120 (472, 432, 58, 51), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
121 (488, 455, 41, 134), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
122 (517, 487, 42, 93), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
123 ))) |
213
20998c650ce1
Fixed rect_drawer tool and adjusted JIM message background.
Jeremy Thurgood <firxen@gmail.com>
parents:
212
diff
changeset
|
124 |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
125 self.add_thing(GenericCryoUnit(8, |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
126 "An empty cryo unit.", |
224
8d8aef45db4e
fixed some typos
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
219
diff
changeset
|
127 "Prisoner A455-9DF9F43C43E5. Medical malpractice. 10 years.", |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
128 ( |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
129 (596, 419, 69, 39), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
130 (616, 442, 82, 40), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
131 (648, 467, 84, 37), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
132 (681, 491, 97, 60), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
133 ))) |
35 | 134 |
120 | 135 def enter(self): |
141
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
136 # Setup music |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
137 pieces = [get_music(x, prefix='sounds') for x in self.MUSIC] |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
138 background_playlist = PlayList(pieces, random=True, repeat=True) |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
139 change_playlist(background_playlist) |
120 | 140 if self.get_data('greet'): |
141 self.set_data('greet', False) | |
202 | 142 return Result( |
224
8d8aef45db4e
fixed some typos
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
219
diff
changeset
|
143 "You hear a voice: 'Greetings, Prisoner %s. " |
202 | 144 "This is the Judicial Incarceration Monitor. " |
145 "You have been woken early under the terms of the " | |
146 "emergency conscription act to help with repairs to " | |
147 "the ship. Your behaviour during this time will " | |
148 "be added to your record and will be relayed to " | |
149 "prison officials when we reach the destination. " | |
212
2b820b4ba3bf
Add constant for player id. Make IDs uppercase
Neil Muller <neil@dip.sun.ac.za>
parents:
210
diff
changeset
|
150 "Please report to the bridge.'" % PLAYER_ID, style="JIM") |
35 | 151 |
141
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
152 def leave(self): |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
153 # Stop music |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
154 change_playlist(None) |
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
155 |
35 | 156 |
219
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
157 class CryoPipeBase(Thing): |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
158 "Base class for cryo pipes that need to be stolen." |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
159 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
160 INITIAL = "fixed" |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
161 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
162 INITIAL_DATA = { |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
163 'fixed': True, |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
164 } |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
165 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
166 def interact_with_machete(self, item): |
247
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
167 if self.get_data('fixed'): |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
168 self.set_data('fixed', False) |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
169 pipe = CryoPipe('cryo_pipe') |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
170 self.state.add_item(pipe) |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
171 self.state.add_inventory_item(pipe.name) |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
172 self.set_interact("chopped") |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
173 return Result("It takes more effort than one would expect, but " |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
174 "eventually the pipe is separated from the wall.") |
219
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
175 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
176 def is_interactive(self): |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
177 return self.get_data('fixed') |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
178 |
247
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
179 def interact_without(self): |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
180 if self.get_data('fixed'): |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
181 return Result("These pipes aren't attached to the wall very solidly.") |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
182 return None |
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
183 |
228
ce1e85768f7b
Flavour interactions for mess hall
Neil Muller <neil@dip.sun.ac.za>
parents:
227
diff
changeset
|
184 def get_description(self): |
ce1e85768f7b
Flavour interactions for mess hall
Neil Muller <neil@dip.sun.ac.za>
parents:
227
diff
changeset
|
185 if self.get_data('fixed'): |
ce1e85768f7b
Flavour interactions for mess hall
Neil Muller <neil@dip.sun.ac.za>
parents:
227
diff
changeset
|
186 return "These pipes carry cooling fluid to the cryo units." |
247
0bad554d0926
More tests, some cryo room fixes and docs in the build.
Jeremy Thurgood <firxen@gmail.com>
parents:
242
diff
changeset
|
187 return "There used to be a pipe carrying cooling fluid here" |
228
ce1e85768f7b
Flavour interactions for mess hall
Neil Muller <neil@dip.sun.ac.za>
parents:
227
diff
changeset
|
188 |
219
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
189 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
190 class CryoPipe(CloneableItem): |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
191 "After emptying the full can." |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
192 |
227 | 193 INVENTORY_IMAGE = "cryo_pipe.png" |
194 CURSOR = CursorSprite('cryo_pipe_cursor.png', 53, 44) | |
226 | 195 TOOL_NAME = "pipe" |
219
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
196 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
197 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
198 class CryoPipeLeft(CryoPipeBase): |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
199 "Left cryo pipe." |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
200 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
201 NAME = "cryo.pipe.left" |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
202 INTERACTS = { |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
203 "fixed": InteractNoImage(125, 192, 27, 258), |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
204 "chopped": InteractImage(125, 192, "triangle.png"), |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
205 } |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
206 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
207 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
208 class CryoPipeRight(CryoPipeBase): |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
209 "Left cryo pipe." |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
210 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
211 NAME = "cryo.pipe.right" |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
212 INTERACTS = { |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
213 "fixed": InteractNoImage(643, 199, 38, 233), |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
214 "chopped": InteractImage(643, 199, "triangle.png"), |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
215 } |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
216 |
326300c218a6
Choppable cryopipes and can refactoring.
Jeremy Thurgood <firxen@gmail.com>
parents:
218
diff
changeset
|
217 |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
218 class TitaniumLeg(Item): |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
219 "Titanium leg, found on a piratical corpse." |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
220 |
91
542ede2896bb
Link in femur inventory image.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
89
diff
changeset
|
221 INVENTORY_IMAGE = "titanium_femur.png" |
218 | 222 CURSOR = CursorSprite('titanium_femur_cursor.png', 20, 3) |
28
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
223 |
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
224 |
39
088a101f5b94
Add an example Thing to cryo scene.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
35
diff
changeset
|
225 class CryoUnitAlpha(Thing): |
67
6b0f7364f3bf
Inventory-related game state.
Jeremy Thurgood <firxen@gmail.com>
parents:
63
diff
changeset
|
226 "Cryo unit containing titanium leg." |
6b0f7364f3bf
Inventory-related game state.
Jeremy Thurgood <firxen@gmail.com>
parents:
63
diff
changeset
|
227 |
86
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
228 NAME = "cryo.unit.1" |
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
229 |
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
230 INTERACTS = { |
133
0530547a131f
Better map handling, detail_view stuff in Result.
Jeremy Thurgood <firxen@gmail.com>
parents:
131
diff
changeset
|
231 "unit": InteractRectUnion(( |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
232 (531, 430, 64, 49), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
233 (560, 460, 57, 47), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
234 (583, 482, 65, 69), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
235 (600, 508, 71, 48), |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
236 )) |
86
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
237 } |
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
238 |
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
239 INITIAL = "unit" |
67
6b0f7364f3bf
Inventory-related game state.
Jeremy Thurgood <firxen@gmail.com>
parents:
63
diff
changeset
|
240 |
6b0f7364f3bf
Inventory-related game state.
Jeremy Thurgood <firxen@gmail.com>
parents:
63
diff
changeset
|
241 INITIAL_DATA = { |
6b0f7364f3bf
Inventory-related game state.
Jeremy Thurgood <firxen@gmail.com>
parents:
63
diff
changeset
|
242 'contains_titanium_leg': True, |
6b0f7364f3bf
Inventory-related game state.
Jeremy Thurgood <firxen@gmail.com>
parents:
63
diff
changeset
|
243 } |
6b0f7364f3bf
Inventory-related game state.
Jeremy Thurgood <firxen@gmail.com>
parents:
63
diff
changeset
|
244 |
6b0f7364f3bf
Inventory-related game state.
Jeremy Thurgood <firxen@gmail.com>
parents:
63
diff
changeset
|
245 def interact_without(self): |
134
faac82748f5a
Put the leg inside the cryo unit.
Jeremy Thurgood <firxen@gmail.com>
parents:
133
diff
changeset
|
246 return Result(detail_view='cryo_detail') |
39
088a101f5b94
Add an example Thing to cryo scene.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
35
diff
changeset
|
247 |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
248 def interact_with_titanium_leg(self, item): |
209
aeb96ca5f76c
Add more sounds to cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
202
diff
changeset
|
249 return Result("You hit the chamber that used to hold this very leg. Nothing happens as a result.", |
aeb96ca5f76c
Add more sounds to cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
202
diff
changeset
|
250 soundfile="clang2.ogg") |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
251 |
94
ce23fad8ecb3
More complex shaped interactables
Neil Muller <neil@dip.sun.ac.za>
parents:
91
diff
changeset
|
252 def get_description(self): |
ce23fad8ecb3
More complex shaped interactables
Neil Muller <neil@dip.sun.ac.za>
parents:
91
diff
changeset
|
253 if self.get_data('contains_titanium_leg'): |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
254 return "A broken cryo chamber, with a poor unfortunate corpse inside." |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
255 return "A broken cryo chamber. The corpse inside is missing a leg." |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
256 |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
257 |
182
5cb3fbe61f75
Add genric thing with description helper class
Neil Muller <neil@dip.sun.ac.za>
parents:
180
diff
changeset
|
258 class GenericCryoUnit(GenericDescThing): |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
259 "Generic Cryo unit" |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
260 |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
261 def __init__(self, number, description, detailed_description, areas): |
182
5cb3fbe61f75
Add genric thing with description helper class
Neil Muller <neil@dip.sun.ac.za>
parents:
180
diff
changeset
|
262 super(GenericCryoUnit, self).__init__('cryo.unit', number, description, areas) |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
263 self.detailed_description = detailed_description |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
264 |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
265 def interact_without(self): |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
266 return Result(self.detailed_description) |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
267 |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
268 def get_description(self): |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
269 return self.description |
94
ce23fad8ecb3
More complex shaped interactables
Neil Muller <neil@dip.sun.ac.za>
parents:
91
diff
changeset
|
270 |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
271 def interact_with_titanium_leg(self, item): |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
272 return Result(random.choice([ |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
273 "You bang on the chamber with the titanium femur. Nothing much happens", |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
274 "Hitting the cryo unit with the femur doesn't achieve anything", |
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
275 "You hit the chamber with the femur. Nothing happens.", |
209
aeb96ca5f76c
Add more sounds to cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
202
diff
changeset
|
276 ]), soundfile="clang2.ogg") |
180
6b3ccee6f3f9
Fill in more flavour for cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
167
diff
changeset
|
277 |
39
088a101f5b94
Add an example Thing to cryo scene.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
35
diff
changeset
|
278 |
242 | 279 class CryoRoomDoor(Door): |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
280 "Door to the cryo room." |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
281 |
86
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
282 NAME = "cryo.door" |
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
283 |
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
284 INTERACTS = { |
95
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
285 "shut": InteractNoImage(290, 260, 99, 152), |
87
4c6fea1b242b
Fix interact positions.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
86
diff
changeset
|
286 "ajar": InteractImage(290, 260, "door_ajar.png"), |
4c6fea1b242b
Fix interact positions.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
86
diff
changeset
|
287 "open": InteractImage(290, 260, "door_open.png"), |
86
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
288 } |
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
289 |
95
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
290 INITIAL = "shut" |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
291 |
55
2e2f6ff54780
Part of the cryo door puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
41
diff
changeset
|
292 INITIAL_DATA = { |
95
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
293 'door': "shut", |
55
2e2f6ff54780
Part of the cryo door puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
41
diff
changeset
|
294 } |
2e2f6ff54780
Part of the cryo door puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
41
diff
changeset
|
295 |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
296 def interact_with_titanium_leg(self, item): |
95
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
297 if self.get_data('door') == "ajar": |
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
298 self.open_door() |
209
aeb96ca5f76c
Add more sounds to cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
202
diff
changeset
|
299 return Result("You wedge the titanium femur into the chain and twist. With a satisfying *snap*, the chain breaks and the door opens.", soundfile='break.ogg') |
118
e548f4a13741
Add a transition, on general principles
Neil Muller <neil@dip.sun.ac.za>
parents:
109
diff
changeset
|
300 elif self.get_data('door') == "shut": |
109
66898d810247
Add hackish speech support (run regen-speech.py to generate files -- needs espeak and oggenc).
Simon Cross <simon@simonx>
parents:
105
diff
changeset
|
301 text = "You bang on the door with the titanium femur. It makes a clanging sound." |
66898d810247
Add hackish speech support (run regen-speech.py to generate files -- needs espeak and oggenc).
Simon Cross <simon@simonx>
parents:
105
diff
changeset
|
302 speech.say(self.name, text) |
141
4f18e68fd0dc
Add a few sounds to the cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
136
diff
changeset
|
303 return Result(text, soundfile='clang.ogg') |
118
e548f4a13741
Add a transition, on general principles
Neil Muller <neil@dip.sun.ac.za>
parents:
109
diff
changeset
|
304 else: |
e548f4a13741
Add a transition, on general principles
Neil Muller <neil@dip.sun.ac.za>
parents:
109
diff
changeset
|
305 return Result("You wave the femur in the doorway. Nothing happens.") |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
306 |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
307 def interact_without(self): |
95
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
308 if self.get_data('door') == "shut": |
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
309 self.half_open_door() |
118
e548f4a13741
Add a transition, on general principles
Neil Muller <neil@dip.sun.ac.za>
parents:
109
diff
changeset
|
310 if self.get_data('door') != "open": |
209
aeb96ca5f76c
Add more sounds to cryo room
Neil Muller <neil@dip.sun.ac.za>
parents:
202
diff
changeset
|
311 return Result("It moves slightly and then stops. A chain on the other side is preventing it from opening completely.", soundfile='chain.ogg') |
118
e548f4a13741
Add a transition, on general principles
Neil Muller <neil@dip.sun.ac.za>
parents:
109
diff
changeset
|
312 else: |
131 | 313 self.state.set_current_scene('map') |
144
29ba5456e8b3
Removed a bunch of cruft.
Jeremy Thurgood <firxen@gmail.com>
parents:
141
diff
changeset
|
314 return None |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
315 |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
316 def interact_default(self, item): |
78 | 317 return Result(random.choice([ |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
318 "Sadly, this isn't that sort of game.", |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
319 "Your valiant efforts are foiled by the Evil Game Designer.", |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
320 "The door resists. Try something else, perhaps?", |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
321 ])) |
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
322 |
95
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
323 def half_open_door(self): |
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
324 self.set_data('door', "ajar") |
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
325 self.set_interact("ajar") |
56
75bf3d3689e9
Refactor thing interactivity and add "fake" bridge scene.
Jeremy Thurgood <firxen@gmail.com>
parents:
55
diff
changeset
|
326 |
55
2e2f6ff54780
Part of the cryo door puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
41
diff
changeset
|
327 def open_door(self): |
95
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
328 self.set_data('door', "open") |
86
593bddfacf18
Refactor Things a bit to render images.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
78
diff
changeset
|
329 self.set_interact("open") |
55
2e2f6ff54780
Part of the cryo door puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
41
diff
changeset
|
330 self.state.scenes['bridge'].set_data('accessible', True) |
147
a039d3b81b3d
Deselect tools and get to the Mess.
Jeremy Thurgood <firxen@gmail.com>
parents:
144
diff
changeset
|
331 self.state.scenes['mess'].set_data('accessible', True) |
55
2e2f6ff54780
Part of the cryo door puzzle.
Jeremy Thurgood <firxen@gmail.com>
parents:
41
diff
changeset
|
332 |
63
3087be3463e0
Some framework support for better message handling
Neil Muller <neil@dip.sun.ac.za>
parents:
56
diff
changeset
|
333 def get_description(self): |
95
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
334 if self.get_data('door') == "open": |
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
335 return 'An open doorway leads to the rest of the ship.' |
103 | 336 elif self.get_data('door') == "ajar": |
95
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
337 return "A rusty door. It can't open all the way because of a chain on the other side." |
7590586180f5
door goes from shut to ajar to open
Adrianna Pińska <adrianna.pinska@gmail.com>
parents:
94
diff
changeset
|
338 return 'A rusty door. It is currently closed.' |
63
3087be3463e0
Some framework support for better message handling
Neil Muller <neil@dip.sun.ac.za>
parents:
56
diff
changeset
|
339 |
41
ad6f56bfa8b7
Cryo door, titanium leg and some interaction prototypes.
Jeremy Thurgood <firxen@gmail.com>
parents:
39
diff
changeset
|
340 |
89
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
341 class CryoComputer(Thing): |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
342 "Computer in the cryo room." |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
343 |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
344 NAME = "cryo.computer" |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
345 |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
346 INTERACTS = { |
189
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
347 "info": InteractAnimated(416, 290, ["comp_info.png", "comp_info2.png"], |
105
65976205fc2d
Rough Stab at basic animation support
Neil Muller <neil@dip.sun.ac.za>
parents:
103
diff
changeset
|
348 10), |
89
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
349 "warn": InteractImage(416, 290, "comp_warn.png"), |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
350 "error": InteractImage(416, 290, "comp_error.png"), |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
351 } |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
352 |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
353 INITIAL = "info" |
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
354 |
189
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
355 def interact_without(self): |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
356 return Result(detail_view='cryo_comp_detail') |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
357 |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
358 def interact_with_titanium_leg(self, item): |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
359 return Result("Hitting it with the leg accomplishes nothing.") |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
360 |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
361 def get_description(self): |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
362 return "A computer terminal, with some text on it." |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
363 |
89
4625efe69c37
Hook up cryo computer.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
87
diff
changeset
|
364 |
125
d3ca34a664fd
Some detail view and data cleanup.
Jeremy Thurgood <firxen@gmail.com>
parents:
120
diff
changeset
|
365 class TitaniumLegThing(Thing): |
119
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
366 "Triangle in the cryo room." |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
367 |
125
d3ca34a664fd
Some detail view and data cleanup.
Jeremy Thurgood <firxen@gmail.com>
parents:
120
diff
changeset
|
368 NAME = "cryo.titanium_leg" |
119
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
369 |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
370 INTERACTS = { |
232
ca490aecbe0e
Updated cryo unit to use new stuff. No more triangles! (Except for the ones that are still there.)
Jeremy Thurgood <firxen@gmail.com>
parents:
228
diff
changeset
|
371 "leg": InteractImage(180, 132, "leg.png"), |
119
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
372 } |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
373 |
134
faac82748f5a
Put the leg inside the cryo unit.
Jeremy Thurgood <firxen@gmail.com>
parents:
133
diff
changeset
|
374 INITIAL = "leg" |
119
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
375 |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
376 def interact_without(self): |
134
faac82748f5a
Put the leg inside the cryo unit.
Jeremy Thurgood <firxen@gmail.com>
parents:
133
diff
changeset
|
377 self.state.add_inventory_item('titanium_leg') |
faac82748f5a
Put the leg inside the cryo unit.
Jeremy Thurgood <firxen@gmail.com>
parents:
133
diff
changeset
|
378 self.state.current_scene.things['cryo.unit.1'].set_data('contains_titanium_leg', False) |
faac82748f5a
Put the leg inside the cryo unit.
Jeremy Thurgood <firxen@gmail.com>
parents:
133
diff
changeset
|
379 self.scene.remove_thing(self) |
faac82748f5a
Put the leg inside the cryo unit.
Jeremy Thurgood <firxen@gmail.com>
parents:
133
diff
changeset
|
380 return Result("The skeletal occupant of this cryo unit has an artificial femur made of titanium. You take it.") |
119
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
381 |
136
d264850806dc
Better description handling in detail windows. (Sort of.)
Jeremy Thurgood <firxen@gmail.com>
parents:
135
diff
changeset
|
382 def get_description(self): |
d264850806dc
Better description handling in detail windows. (Sort of.)
Jeremy Thurgood <firxen@gmail.com>
parents:
135
diff
changeset
|
383 return "This femur looks synthetic." |
d264850806dc
Better description handling in detail windows. (Sort of.)
Jeremy Thurgood <firxen@gmail.com>
parents:
135
diff
changeset
|
384 |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
385 class PlaqueThing(Thing): |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
386 "Plaque on the detailed cryo chamber" |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
387 |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
388 NAME = "cryo.plaque" |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
389 |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
390 INTERACTS = { |
232
ca490aecbe0e
Updated cryo unit to use new stuff. No more triangles! (Except for the ones that are still there.)
Jeremy Thurgood <firxen@gmail.com>
parents:
228
diff
changeset
|
391 "plaque": InteractNoImage(60, 40, 35, 24), |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
392 } |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
393 |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
394 INITIAL = "plaque" |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
395 |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
396 def interact_without(self): |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
397 return Result("The plaque is welded to the unit. You can't shift it") |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
398 |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
399 def get_description(self): |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
400 return "'Prisoner 98cc-764e646391ee. War crimes. 45 years." |
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
401 |
189
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
402 class CryoCompDetail(Scene): |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
403 |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
404 FOLDER = "cryo" |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
405 BACKGROUND = "comp_info_detail.png" |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
406 NAME = "cryo_comp_detail" |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
407 |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
408 SIZE = (640, 400) |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
409 |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
410 def __init__(self, state): |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
411 super(CryoCompDetail, self).__init__(state) |
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
412 |
119
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
413 |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
414 class CryoUnitWithCorpse(Scene): |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
415 |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
416 FOLDER = "cryo" |
127
9646e7c8bb97
Size detail window based on the Scene background image.
Jeremy Thurgood <firxen@gmail.com>
parents:
125
diff
changeset
|
417 BACKGROUND = "cryo_unit_detail.png" |
119
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
418 NAME = "cryo_detail" |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
419 |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
420 SIZE = (300, 300) |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
421 |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
422 def __init__(self, state): |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
423 super(CryoUnitWithCorpse, self).__init__(state) |
125
d3ca34a664fd
Some detail view and data cleanup.
Jeremy Thurgood <firxen@gmail.com>
parents:
120
diff
changeset
|
424 self.add_thing(TitaniumLegThing()) |
157
153dcb313057
Fill in more cryo room stuff
Neil Muller <neil@dip.sun.ac.za>
parents:
148
diff
changeset
|
425 self.add_thing(PlaqueThing()) |
119
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
426 |
d5f7cccfdb6c
Hook up "detail view" scenes.
Jeremy Thurgood <firxen@gmail.com>
parents:
118
diff
changeset
|
427 |
28
0f25f7b9b37a
Add loading of initial state.
Simon Cross <hodgestar+bzr@gmail.com>
parents:
diff
changeset
|
428 SCENES = [Cryo] |
189
c18ef647ffe6
Add detail view for cryo screen. Tweak animation
Neil Muller <neil@dip.sun.ac.za>
parents:
183
diff
changeset
|
429 DETAIL_VIEWS = [CryoUnitWithCorpse, CryoCompDetail] |