Mercurial > pyntnclick
comparison gamelib/scenes/bridge.py @ 352:88c1a59b0544
Add sentence for bridge. Have poster break AI
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 15:53:56 +0200 |
parents | 125cb389ab90 |
children | 09efb8b7c132 |
comparison
equal
deleted
inserted
replaced
351:837728b3cbf4 | 352:88c1a59b0544 |
---|---|
7 | 7 |
8 from gamelib.cursor import CursorSprite | 8 from gamelib.cursor import CursorSprite |
9 from gamelib.state import Scene, Item, Thing, Result | 9 from gamelib.state import Scene, Item, Thing, Result |
10 from gamelib.sound import get_current_playlist | 10 from gamelib.sound import get_current_playlist |
11 | 11 |
12 from gamelib.scenes.game_constants import PLAYER_ID | |
12 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage, | 13 from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage, |
13 InteractRectUnion, InteractImage, | 14 InteractRectUnion, InteractImage, |
14 InteractAnimated, GenericDescThing, | 15 InteractAnimated, GenericDescThing, |
15 BaseCamera) | 16 BaseCamera) |
16 | 17 |
33 'silent.ogg', | 34 'silent.ogg', |
34 ] | 35 ] |
35 | 36 |
36 INITIAL_DATA = { | 37 INITIAL_DATA = { |
37 'accessible': True, | 38 'accessible': True, |
39 'ai online' : True, | |
38 } | 40 } |
39 | 41 |
40 def __init__(self, state): | 42 def __init__(self, state): |
41 super(Bridge, self).__init__(state) | 43 super(Bridge, self).__init__(state) |
42 self.background_playlist = None | 44 self.background_playlist = None |
72 | 74 |
73 def enter(self): | 75 def enter(self): |
74 pieces = [get_music(x, prefix='sounds') for x in self.MUSIC] | 76 pieces = [get_music(x, prefix='sounds') for x in self.MUSIC] |
75 self.background_playlist = PlayList(pieces, random=True, repeat=True) | 77 self.background_playlist = PlayList(pieces, random=True, repeat=True) |
76 change_playlist(self.background_playlist) | 78 change_playlist(self.background_playlist) |
79 if self.get_data('ai online'): | |
80 return Result("JIM says: 'Prisone %s. The bridge is a restricted area. " | |
81 "Entering this area is a class 3 offence and each infraction carries a minimal " | |
82 "penalty of an additional 6 months on your sentence;" % PLAYER_ID, | |
83 style="JIM") | |
77 | 84 |
78 def leave(self): | 85 def leave(self): |
79 change_playlist(None) | 86 change_playlist(None) |
80 | 87 |
81 | 88 |