comparison gamelib/scenes/cryo.py @ 180:6b3ccee6f3f9

Fill in more flavour for cryo room
author Neil Muller <neil@dip.sun.ac.za>
date Wed, 25 Aug 2010 15:28:44 +0200
parents 5845a3ed4dad
children 5cb3fbe61f75
comparison
equal deleted inserted replaced
179:39f75faf16cb 180:6b3ccee6f3f9
39 self.add_thing(CryoUnitAlpha()) 39 self.add_thing(CryoUnitAlpha())
40 self.add_thing(CryoRoomDoor()) 40 self.add_thing(CryoRoomDoor())
41 self.add_thing(CryoComputer()) 41 self.add_thing(CryoComputer())
42 self.add_thing(GenericCryoUnit(2, 42 self.add_thing(GenericCryoUnit(2,
43 "An empty cryo chamber.", 43 "An empty cryo chamber.",
44 "Prisoner 81e4-c8900480e635. Embezzlement. 10 years.", 44 "Prisoner 81e4-c8900480e635. Embezzlement. 20 years.",
45 ((155, 430, 50, 35), (125, 450, 60, 35), (95, 470, 60, 35), 45 (
46 (55, 490, 60, 55)))) 46 (155, 430, 50, 35),
47 (125, 450, 60, 35),
48 (95, 470, 60, 35),
49 (55, 490, 60, 55),
50 )))
47 self.add_thing(GenericCryoUnit(3, 51 self.add_thing(GenericCryoUnit(3,
48 "A working cryo chamber. The frosted glass obscures the details of the occupant.", 52 "A working cryo chamber. The frosted glass obscures the details of the occupant.",
49 "Prisoner 9334-ce1eb0243bab. Murder. 40 years.", 53 "Prisoner 9334-ce1eb0243bab. Murder. 40 years.",
50 ((215, 430, 50, 35), (205, 450, 50, 35), (185, 470, 50, 35), 54 (
51 (125, 505, 80, 40)))) 55 (215, 430, 50, 35),
56 (205, 450, 50, 35),
57 (185, 470, 50, 35),
58 (125, 505, 80, 40),
59 )))
52 self.add_thing(GenericCryoUnit(4, 60 self.add_thing(GenericCryoUnit(4,
53 "A broken cryo chamber. The skeleton inside has been picked clean.", 61 "A broken cryo chamber. The skeleton inside has been picked clean.",
54 "Prisoner bfbc-8bf4c6b7492b. Importing illegal alien biomatter. 15 years.", 62 "Prisoner bfbc-8bf4c6b7492b. Importing illegal alien biomatter. 15 years.",
55 ((275, 430, 50, 70), (255, 460, 50, 70), (235, 490, 50, 60)))) 63 (
64 (275, 430, 50, 70),
65 (255, 460, 50, 70),
66 (235, 490, 50, 60),
67 )))
56 self.add_thing(GenericCryoUnit(5, 68 self.add_thing(GenericCryoUnit(5,
57 "A working cryo chamber. The frosted glass obscures the details of the occupant.", 69 "A working cryo chamber. The frosted glass obscures the details of the occupant.",
58 "Prisoner b520-99495b8c41ce. Copyright infringment. 60 years.", 70 "Prisoner b520-99495b8c41ce. Copyright infringment. 60 years.",
59 ((340, 430, 50, 70), (330, 500, 60, 50)))) 71 (
60 72 (340, 430, 50, 70),
73 (330, 500, 60, 50),
74 )))
75 self.add_thing(GenericCryoUnit(6,
76 "An empty cryo unit. Recently filled by you.",
77 "Prisoner 84c7-d10dcfda0878. Safe cracker. 30 years.",
78 (
79 (399, 426, 70, 56),
80 (404, 455, 69, 120),
81 )))
82 self.add_thing(GenericCryoUnit(7,
83 "An empty cryo unit.",
84 "Prisoner 83f1-ce32d3234749. Spammer. 5 years",
85 (
86 (472, 432, 58, 51),
87 (488, 455, 41, 134),
88 (517, 487, 42, 93),
89 )))
90 self.add_thing(GenericCryoUnit(8,
91 "An empty cryo unit.",
92 "Prisoner 48af-a455-9df9f43c43e5. Medical Malpractice. 10 years.",
93 (
94 (596, 419, 69, 39),
95 (616, 442, 82, 40),
96 (648, 467, 84, 37),
97 (681, 491, 97, 60),
98 )))
61 99
62 def enter(self): 100 def enter(self):
63 # Setup music 101 # Setup music
64 pieces = [get_music(x, prefix='sounds') for x in self.MUSIC] 102 pieces = [get_music(x, prefix='sounds') for x in self.MUSIC]
65 background_playlist = PlayList(pieces, random=True, repeat=True) 103 background_playlist = PlayList(pieces, random=True, repeat=True)
66 change_playlist(background_playlist) 104 change_playlist(background_playlist)
67 if self.get_data('greet'): 105 if self.get_data('greet'):
68 self.set_data('greet', False) 106 self.set_data('greet', False)
69 return Result("Greetings Prisoner id. You have woken early under" 107 return Result("Greetings Prisoner 84c7-d10dcfda0878. You have woken early under"
70 " the terms of the emergency conscription act to help with" 108 " the terms of the emergency conscription act to help with"
71 " repairs to the ship. Your behaviour during this time will" 109 " repairs to the ship. Your behaviour during this time will"
72 " be added to your record and will be relayed to " 110 " be added to your record and will be relayed to "
73 " prison officials when we reach the destination." 111 " prison officials when we reach the destination."
74 " Please report to the bridge.") 112 " Please report to the bridge.")
90 128
91 NAME = "cryo.unit.1" 129 NAME = "cryo.unit.1"
92 130
93 INTERACTS = { 131 INTERACTS = {
94 "unit": InteractRectUnion(( 132 "unit": InteractRectUnion((
95 (530, 430, 80, 50), 133 (531, 430, 64, 49),
96 (560, 470, 70, 50), 134 (560, 460, 57, 47),
97 (600, 510, 70, 40), 135 (583, 482, 65, 69),
98 )) 136 (600, 508, 71, 48),
137 ))
99 } 138 }
100 139
101 INITIAL = "unit" 140 INITIAL = "unit"
102 141
103 INITIAL_DATA = { 142 INITIAL_DATA = {
105 } 144 }
106 145
107 def interact_without(self): 146 def interact_without(self):
108 return Result(detail_view='cryo_detail') 147 return Result(detail_view='cryo_detail')
109 148
149 def interact_with_titanium_leg(self, item):
150 return Result("You hit the chamber that used to hold this very leg. Nothing happens as a result.")
151
110 def get_description(self): 152 def get_description(self):
111 if self.get_data('contains_titanium_leg'): 153 if self.get_data('contains_titanium_leg'):
112 return "A broken cryo chamber, with an poor unfortunate corpse inside." 154 return "A broken cryo chamber, with a poor unfortunate corpse inside."
113 return "A broken cryo chamber. The corpse inside is missing a leg." 155 return "A broken cryo chamber. The corpse inside is missing a leg."
156
114 157
115 class GenericCryoUnit(Thing): 158 class GenericCryoUnit(Thing):
116 "Generic Cryo unit" 159 "Generic Cryo unit"
117 160
118 INITIAL = 'unit' 161 INITIAL = 'unit'
133 return Result(self.detailed_description) 176 return Result(self.detailed_description)
134 177
135 def get_description(self): 178 def get_description(self):
136 return self.description 179 return self.description
137 180
181 def interact_with_titanium_leg(self, item):
182 return Result(random.choice([
183 "You bang on the chamber with the titanium femur. Nothing much happens",
184 "Hitting the cryo unit with the femur doesn't achieve anything",
185 "You hit the chamber with the femur. Nothing happens.",
186 ]))
187
138 188
139 class CryoRoomDoor(Thing): 189 class CryoRoomDoor(Thing):
140 "Door to the cryo room." 190 "Door to the cryo room."
141 191
142 NAME = "cryo.door" 192 NAME = "cryo.door"