comparison gamelib/scenes/bridge.py @ 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 eef2fca1aa11
comparison
equal deleted inserted replaced
369:8a288db78f40 370:8936c043d7a1
225 self.scene.remove_thing(self) 225 self.scene.remove_thing(self)
226 return Result("The superconductor module unclips easily.") 226 return Result("The superconductor module unclips easily.")
227 227
228 class BlinkingLights(Thing): 228 class BlinkingLights(Thing):
229 229
230 def __init__(self):
231 super(BlinkingLights, self).__init__()
232 self.description = None
233
230 def is_interactive(self): 234 def is_interactive(self):
231 return False 235 return False
232 236
233 def get_description(self): 237 def leave(self):
234 return random.choice([ 238 self.description = random.choice([
235 "The lights flash in interesting patterns.", 239 "The lights flash in interesting patterns.",
236 "The flashing lights don't mean anything to you.", 240 "The flashing lights don't mean anything to you.",
237 "The console lights flash and flicker.", 241 "The console lights flash and flicker.",
238 ]) 242 ])
243
244 def get_description(self):
245 if not self.description:
246 self.leave()
247 return self.description
239 248
240 class LeftLights(BlinkingLights): 249 class LeftLights(BlinkingLights):
241 250
242 NAME ='bridge.lights.1' 251 NAME ='bridge.lights.1'
243 252