Mercurial > pyntnclick
comparison gamelib/scenes/map.py @ 343:b3bc101171ea
Don't allow access to the engine room without helmet
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 28 Aug 2010 14:43:00 +0200 |
parents | 3b4a78422201 |
children | 782ff7e53928 |
comparison
equal
deleted
inserted
replaced
342:e1cae2b61443 | 343:b3bc101171ea |
---|---|
128 "accessible": InteractText(300, 300, "To Engine", (0, 127, 0)), | 128 "accessible": InteractText(300, 300, "To Engine", (0, 127, 0)), |
129 } | 129 } |
130 | 130 |
131 INITIAL = "inaccessible" | 131 INITIAL = "inaccessible" |
132 | 132 |
133 def interact_without(self): | |
134 if not self.state.is_in_inventory('helmet'): | |
135 return Result("JIM says 'The engine room is in vacumn. I cannot" | |
136 " open the airlock unless you have some suitable" | |
137 " protective gear", style="JIM") | |
138 else: | |
139 return super(ToEngine, self).interact_without() | |
140 | |
133 | 141 |
134 class ToMachine(DoorThing): | 142 class ToMachine(DoorThing): |
135 "Way to machine room." | 143 "Way to machine room." |
136 | 144 |
137 NAME = "map.tomachine" | 145 NAME = "map.tomachine" |