Mercurial > pyntnclick
changeset 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 | 837728b3cbf4 |
children | b61dccc7fb42 |
files | gamelib/scenes/bridge.py gamelib/scenes/scene_widgets.py |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/scenes/bridge.py Sat Aug 28 15:39:39 2010 +0200 +++ b/gamelib/scenes/bridge.py Sat Aug 28 15:53:56 2010 +0200 @@ -9,6 +9,7 @@ from gamelib.state import Scene, Item, Thing, Result from gamelib.sound import get_current_playlist +from gamelib.scenes.game_constants import PLAYER_ID from gamelib.scenes.scene_widgets import (Door, InteractText, InteractNoImage, InteractRectUnion, InteractImage, InteractAnimated, GenericDescThing, @@ -35,6 +36,7 @@ INITIAL_DATA = { 'accessible': True, + 'ai online' : True, } def __init__(self, state): @@ -74,6 +76,11 @@ pieces = [get_music(x, prefix='sounds') for x in self.MUSIC] self.background_playlist = PlayList(pieces, random=True, repeat=True) change_playlist(self.background_playlist) + if self.get_data('ai online'): + return Result("JIM says: 'Prisone %s. The bridge is a restricted area. " + "Entering this area is a class 3 offence and each infraction carries a minimal " + "penalty of an additional 6 months on your sentence;" % PLAYER_ID, + style="JIM") def leave(self): change_playlist(None)
--- a/gamelib/scenes/scene_widgets.py Sat Aug 28 15:39:39 2010 +0200 +++ b/gamelib/scenes/scene_widgets.py Sat Aug 28 15:53:56 2010 +0200 @@ -186,6 +186,6 @@ return "A security camera watches over the room" def interact_with_escher_poster(self, item): - # TODO - return Result("A very bad idea") + self.state.scenes['bridge'].set_data('ai online', False) + return Result("JIM says '3D scene reconstruction failed. Critical error. Entering emergency shutdown.", style="JIM")