# HG changeset patch # User Neil Muller # Date 1283009940 -7200 # Node ID 8936c043d7a16a6267df01702a2339937339c06b # Parent 8a288db78f4090d76e7fbacf4525887d8654a613 Fix bliken lights description diff -r 8a288db78f40 -r 8936c043d7a1 gamelib/scenes/bridge.py --- 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'