comparison gamelib/scenes/cryo.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 b61dccc7fb42
children 9d97d2e338db
comparison
equal deleted inserted replaced
359:6b94f549443b 360:452230d78541
9 from gamelib.state import Scene, Item, CloneableItem, Thing, Result 9 from gamelib.state import Scene, Item, CloneableItem, Thing, Result
10 from gamelib.constants import DEBUG 10 from gamelib.constants import DEBUG
11 from gamelib.scenes.game_constants import PLAYER_ID 11 from gamelib.scenes.game_constants import PLAYER_ID
12 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage, 12 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage,
13 InteractRectUnion, InteractImage, 13 InteractRectUnion, InteractImage,
14 InteractAnimated, GenericDescThing) 14 InteractAnimated, GenericDescThing,
15 make_jim_dialog)
15 16
16 17
17 class Cryo(Scene): 18 class Cryo(Scene):
18 19
19 FOLDER = "cryo" 20 FOLDER = "cryo"
131 pieces = [get_music(x, prefix='sounds') for x in self.MUSIC] 132 pieces = [get_music(x, prefix='sounds') for x in self.MUSIC]
132 background_playlist = PlayList(pieces, random=True, repeat=True) 133 background_playlist = PlayList(pieces, random=True, repeat=True)
133 change_playlist(background_playlist) 134 change_playlist(background_playlist)
134 if self.get_data('greet'): 135 if self.get_data('greet'):
135 self.set_data('greet', False) 136 self.set_data('greet', False)
136 return Result( 137 return make_jim_dialog(
137 "You hear a voice: 'Greetings, Prisoner %s. " 138 "Greetings, Prisoner %s. This is the Judicial "
138 "This is the Judicial Incarceration Monitor. " 139 "Incarceration Monitor. "
139 "You have been woken early under the terms of the " 140 "You have been woken early under the terms of the "
140 "emergency conscription act to help with repairs to " 141 "emergency conscription act to help with repairs to "
141 "the ship. Your behaviour during this time will " 142 "the ship. Your behaviour during this time will "
142 "be added to your record and will be relayed to " 143 "be added to your record and will be relayed to "
143 "prison officials when we reach the destination. " 144 "prison officials when we reach the destination. "
144 "Please report to the bridge.'" % PLAYER_ID, style="JIM") 145 "Please report to the bridge.'" % PLAYER_ID, self.state)
145 146
146 def leave(self): 147 def leave(self):
147 # Stop music 148 # Stop music
148 change_playlist(None) 149 change_playlist(None)
149 150