# HG changeset patch # User Neil Muller # Date 1282657142 -7200 # Node ID e548f4a137416d977f8ce30b6a9b80f5037642a7 # Parent 139864ce8bdb2700b468c142a2e9f414109e9cb0 Add a transition, on general principles diff -r 139864ce8bdb -r e548f4a13741 gamelib/scenes/cryo.py --- a/gamelib/scenes/cryo.py Tue Aug 24 15:30:51 2010 +0200 +++ b/gamelib/scenes/cryo.py Tue Aug 24 15:39:02 2010 +0200 @@ -96,15 +96,21 @@ if self.get_data('door') == "ajar": self.open_door() return Result("You wedge the titanium femur into the chain and twist. With a satisfying *snap*, the chain breaks and the door opens.") - else: + elif self.get_data('door') == "shut": text = "You bang on the door with the titanium femur. It makes a clanging sound." speech.say(self.name, text) return Result(text) + else: + return Result("You wave the femur in the doorway. Nothing happens.") def interact_without(self): if self.get_data('door') == "shut": self.half_open_door() - return Result("It moves slightly and then stops. A chain on the other side is preventing it from opening completely.") + if self.get_data('door') != "open": + return Result("It moves slightly and then stops. A chain on the other side is preventing it from opening completely.") + else: + self.state.set_current_scene('bridge') + return Result("you leave the room, hoping to never return.") def interact_default(self, item): return Result(random.choice([ @@ -114,7 +120,7 @@ ])) def is_interactive(self): - return self.get_data('door') != "open" + return True def half_open_door(self): self.set_data('door', "ajar")