Mercurial > boomslang
diff gamelib/scenes/cryo.py @ 120:48d24a48d0ce
Enter and leave hooks
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Tue, 24 Aug 2010 17:24:54 +0200 |
parents | d5f7cccfdb6c |
children | d3ca34a664fd |
line wrap: on
line diff
--- a/gamelib/scenes/cryo.py Tue Aug 24 17:04:56 2010 +0200 +++ b/gamelib/scenes/cryo.py Tue Aug 24 17:24:54 2010 +0200 @@ -15,6 +15,7 @@ INITIAL_DATA = { 'accessible': True, + 'greet' : True } def __init__(self, state): @@ -25,6 +26,15 @@ self.add_thing(CryoRoomDoor()) self.add_thing(CryoComputer()) + def enter(self): + if self.get_data('greet'): + self.set_data('greet', False) + return Result("Greetings Prisoner id. You have woken early under" + " the terms of the emergency conscription act to help with" + " repairs to the ship. Your behaviour during this time will" + " be added to your record and will be relayed to " + " prison officials when we reach the destination." + " Please report to the bridge.") class Triangle(Item): "Test item. Needs to go away at some point."