Mercurial > pyntnclick
diff gamelib/scenes/cryo.py @ 94:ce23fad8ecb3
More complex shaped interactables
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Tue, 24 Aug 2010 00:56:31 +0200 |
parents | 542ede2896bb |
children | 7590586180f5 |
line wrap: on
line diff
--- a/gamelib/scenes/cryo.py Tue Aug 24 00:43:32 2010 +0200 +++ b/gamelib/scenes/cryo.py Tue Aug 24 00:56:31 2010 +0200 @@ -3,7 +3,7 @@ import random from gamelib.state import Scene, Item, Thing, Result, \ - InteractImage, InteractNoImage + InteractImage, InteractNoImage, InteractRectUnion class Cryo(Scene): @@ -42,7 +42,8 @@ NAME = "cryo.unit.1" INTERACTS = { - "unit": InteractNoImage(520, 430, 80, 50), + "unit": InteractRectUnion(((520, 430, 80, 50), (550, 470, 90, 60), + (600, 510, 60, 40))) } INITIAL = "unit" @@ -59,6 +60,11 @@ def is_interactive(self): return self.get_data('contains_titanium_leg') + def get_description(self): + if self.get_data('contains_titanium_leg'): + return "A broken cryo chamber, with an poor unfortunate corpse inside" + return "A broken cryo chamber. The corpse inside is missing a leg" + class CryoRoomDoor(Thing): "Door to the cryo room."