Mercurial > pyntnclick
changeset 370:8936c043d7a1
Fix bliken lights description
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 17:39:00 +0200 |
parents | 8a288db78f40 |
children | 3838f4a563a8 |
files | gamelib/scenes/bridge.py |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/scenes/bridge.py Sat Aug 28 17:36:40 2010 +0200 +++ b/gamelib/scenes/bridge.py Sat Aug 28 17:39:00 2010 +0200 @@ -227,16 +227,25 @@ class BlinkingLights(Thing): + def __init__(self): + super(BlinkingLights, self).__init__() + self.description = None + def is_interactive(self): return False - def get_description(self): - return random.choice([ + def leave(self): + self.description = random.choice([ "The lights flash in interesting patterns.", "The flashing lights don't mean anything to you.", "The console lights flash and flicker.", ]) + def get_description(self): + if not self.description: + self.leave() + return self.description + class LeftLights(BlinkingLights): NAME ='bridge.lights.1'