Mercurial > pyntnclick
comparison gamelib/scenes/cryo.py @ 212:2b820b4ba3bf
Add constant for player id. Make IDs uppercase
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Thu, 26 Aug 2010 19:33:23 +0200 |
parents | eb101b6fb3dd |
children | 20998c650ce1 |
comparison
equal
deleted
inserted
replaced
211:969b1cb4b567 | 212:2b820b4ba3bf |
---|---|
9 from gamelib.state import Scene, Item, Thing, Result, \ | 9 from gamelib.state import Scene, Item, Thing, Result, \ |
10 InteractImage, InteractNoImage, InteractRectUnion, \ | 10 InteractImage, InteractNoImage, InteractRectUnion, \ |
11 InteractAnimated | 11 InteractAnimated |
12 from gamelib.statehelpers import GenericDescThing | 12 from gamelib.statehelpers import GenericDescThing |
13 from gamelib.constants import DEBUG | 13 from gamelib.constants import DEBUG |
14 from gamelib.scenes.game_constants import PLAYER_ID | |
14 | 15 |
15 | 16 |
16 class Cryo(Scene): | 17 class Cryo(Scene): |
17 | 18 |
18 FOLDER = "cryo" | 19 FOLDER = "cryo" |
61 (44, 133, 74, 107), | 62 (44, 133, 74, 107), |
62 ))) | 63 ))) |
63 # cryo units | 64 # cryo units |
64 self.add_thing(GenericCryoUnit(2, | 65 self.add_thing(GenericCryoUnit(2, |
65 "An empty cryo chamber.", | 66 "An empty cryo chamber.", |
66 "Prisoner 81e4-c8900480e635. Embezzlement. 20 years.", | 67 "Prisoner 81E4-C8900480E635. Embezzlement. 20 years.", |
67 ( | 68 ( |
68 (155, 430, 50, 35), | 69 (155, 430, 50, 35), |
69 (125, 450, 60, 35), | 70 (125, 450, 60, 35), |
70 (95, 470, 60, 35), | 71 (95, 470, 60, 35), |
71 (55, 490, 60, 55), | 72 (55, 490, 60, 55), |
72 ))) | 73 ))) |
73 self.add_thing(GenericCryoUnit(3, | 74 self.add_thing(GenericCryoUnit(3, |
74 "A working cryo chamber. The frosted glass obscures the details of the occupant.", | 75 "A working cryo chamber. The frosted glass obscures the details of the occupant.", |
75 "Prisoner 9334-ce1eb0243bab. Murder. 40 years.", | 76 "Prisoner 9334-CE1EB0243BAB. Murder. 40 years.", |
76 ( | 77 ( |
77 (215, 430, 50, 35), | 78 (215, 430, 50, 35), |
78 (205, 450, 50, 35), | 79 (205, 450, 50, 35), |
79 (185, 470, 50, 35), | 80 (185, 470, 50, 35), |
80 (125, 505, 80, 40), | 81 (125, 505, 80, 40), |
81 ))) | 82 ))) |
82 self.add_thing(GenericCryoUnit(4, | 83 self.add_thing(GenericCryoUnit(4, |
83 "A broken cryo chamber. The skeleton inside has been picked clean.", | 84 "A broken cryo chamber. The skeleton inside has been picked clean.", |
84 "Prisoner bfbc-8bf4c6b7492b. Importing illegal alien biomatter. 15 years.", | 85 "Prisoner BFBC-8BF4C6B7492B. Importing illegal alien biomatter. 15 years.", |
85 ( | 86 ( |
86 (275, 430, 50, 70), | 87 (275, 430, 50, 70), |
87 (255, 460, 50, 70), | 88 (255, 460, 50, 70), |
88 (235, 490, 50, 60), | 89 (235, 490, 50, 60), |
89 ))) | 90 ))) |
90 self.add_thing(GenericCryoUnit(5, | 91 self.add_thing(GenericCryoUnit(5, |
91 "A working cryo chamber. The frosted glass obscures the details of the occupant.", | 92 "A working cryo chamber. The frosted glass obscures the details of the occupant.", |
92 "Prisoner b520-99495b8c41ce. Copyright infringment. 60 years.", | 93 "Prisoner B520-99495B8C41CE. Copyright infringment. 60 years.", |
93 ( | 94 ( |
94 (340, 430, 50, 70), | 95 (340, 430, 50, 70), |
95 (330, 500, 60, 50), | 96 (330, 500, 60, 50), |
96 ))) | 97 ))) |
97 self.add_thing(GenericCryoUnit(6, | 98 self.add_thing(GenericCryoUnit(6, |
98 "An empty cryo unit. Recently filled by you.", | 99 "An empty cryo unit. Recently filled by you.", |
99 "Prisoner 84c7-d10dcfda0878. Safe cracker. 30 years.", | 100 "Prisoner %s. Safe cracker. 30 years." % PLAYER_ID, |
100 ( | 101 ( |
101 (399, 426, 70, 56), | 102 (399, 426, 70, 56), |
102 (404, 455, 69, 120), | 103 (404, 455, 69, 120), |
103 ))) | 104 ))) |
104 self.add_thing(GenericCryoUnit(7, | 105 self.add_thing(GenericCryoUnit(7, |
105 "An empty cryo unit.", | 106 "An empty cryo unit.", |
106 "Prisoner 83f1-ce32d3234749. Spammer. 5 years", | 107 "Prisoner 83F1-CE32D3234749. Spammer. 5 years", |
107 ( | 108 ( |
108 (472, 432, 58, 51), | 109 (472, 432, 58, 51), |
109 (488, 455, 41, 134), | 110 (488, 455, 41, 134), |
110 (517, 487, 42, 93), | 111 (517, 487, 42, 93), |
111 ))) | 112 ))) |
112 self.add_thing(GenericCryoUnit(8, | 113 self.add_thing(GenericCryoUnit(8, |
113 "An empty cryo unit.", | 114 "An empty cryo unit.", |
114 "Prisoner 48af-a455-9df9f43c43e5. Medical Malpractice. 10 years.", | 115 "Prisoner A455-9DF9F43C43E5. Medical Malpractice. 10 years.", |
115 ( | 116 ( |
116 (596, 419, 69, 39), | 117 (596, 419, 69, 39), |
117 (616, 442, 82, 40), | 118 (616, 442, 82, 40), |
118 (648, 467, 84, 37), | 119 (648, 467, 84, 37), |
119 (681, 491, 97, 60), | 120 (681, 491, 97, 60), |
125 background_playlist = PlayList(pieces, random=True, repeat=True) | 126 background_playlist = PlayList(pieces, random=True, repeat=True) |
126 change_playlist(background_playlist) | 127 change_playlist(background_playlist) |
127 if self.get_data('greet'): | 128 if self.get_data('greet'): |
128 self.set_data('greet', False) | 129 self.set_data('greet', False) |
129 return Result( | 130 return Result( |
130 "You hear a voice: 'Greetings Prisoner 84c7-d10dcfda0878. " | 131 "You hear a voice: 'Greetings Prisoner %s. " |
131 "This is the Judicial Incarceration Monitor. " | 132 "This is the Judicial Incarceration Monitor. " |
132 "You have been woken early under the terms of the " | 133 "You have been woken early under the terms of the " |
133 "emergency conscription act to help with repairs to " | 134 "emergency conscription act to help with repairs to " |
134 "the ship. Your behaviour during this time will " | 135 "the ship. Your behaviour during this time will " |
135 "be added to your record and will be relayed to " | 136 "be added to your record and will be relayed to " |
136 "prison officials when we reach the destination. " | 137 "prison officials when we reach the destination. " |
137 "Please report to the bridge.'", style="JIM") | 138 "Please report to the bridge.'" % PLAYER_ID, style="JIM") |
138 | 139 |
139 def leave(self): | 140 def leave(self): |
140 # Stop music | 141 # Stop music |
141 change_playlist(None) | 142 change_playlist(None) |
142 | 143 |