Mercurial > boomslang
comparison gamelib/scenes/crew_quarters.py @ 360:452230d78541
Use make_jim_dialog everywhere
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 16:51:40 +0200 |
parents | 6b94f549443b |
children | 4e939b3c73f8 |
comparison
equal
deleted
inserted
replaced
359:6b94f549443b | 360:452230d78541 |
---|---|
5 | 5 |
6 from gamelib.scenes.game_constants import PLAYER_ID | 6 from gamelib.scenes.game_constants import PLAYER_ID |
7 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage, | 7 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage, |
8 InteractRectUnion, InteractImage, | 8 InteractRectUnion, InteractImage, |
9 InteractAnimated, GenericDescThing, | 9 InteractAnimated, GenericDescThing, |
10 BaseCamera) | 10 BaseCamera, make_jim_dialog) |
11 | 11 |
12 class CrewQuarters(Scene): | 12 class CrewQuarters(Scene): |
13 | 13 |
14 FOLDER = "crew_quarters" | 14 FOLDER = "crew_quarters" |
15 BACKGROUND = "crew_quarters.png" | 15 BACKGROUND = "crew_quarters.png" |
89 self.set_interact('full_safe') | 89 self.set_interact('full_safe') |
90 open_result = Result("Even after centuries of neglect, the tumblers slide" | 90 open_result = Result("Even after centuries of neglect, the tumblers slide" |
91 " almost silently into place. Turns out the combination" | 91 " almost silently into place. Turns out the combination" |
92 " was '1 2 3 4 5'. An idiot must keep his luggage in" | 92 " was '1 2 3 4 5'. An idiot must keep his luggage in" |
93 " here.") | 93 " here.") |
94 if self.state.scenes['bridge'].get_data('ai status') == 'online': | 94 ai_result = make_jim_dialog("Prisoner %s, you have been observed commiting a felony violation. " |
95 return open_result, Result("JIM says: 'Prisoner %s, you have been observed commiting a felony violation. " | |
96 "This will go onto your permenant record, and your sentence may be extended by up to twenty years." | 95 "This will go onto your permenant record, and your sentence may be extended by up to twenty years." |
97 % PLAYER_ID, style="JIM") | 96 % PLAYER_ID, self.state) |
98 else: | 97 if ai_result: |
99 return open_result | 98 return open_result, ai_result |
99 return open_result | |
100 | 100 |
101 def get_description(self): | 101 def get_description(self): |
102 return "Ah, a vintage Knoxx & Co. model QR3. Quaint, but reasonably secure." | 102 return "Ah, a vintage Knoxx & Co. model QR3. Quaint, but reasonably secure." |
103 | 103 |
104 | 104 |