Mercurial > boomslang
changeset 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 | e1cae2b61443 |
children | 93e52ee01b06 |
files | gamelib/scenes/map.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/gamelib/scenes/map.py Sat Aug 28 14:42:41 2010 +0200 +++ b/gamelib/scenes/map.py Sat Aug 28 14:43:00 2010 +0200 @@ -130,6 +130,14 @@ INITIAL = "inaccessible" + def interact_without(self): + if not self.state.is_in_inventory('helmet'): + return Result("JIM says 'The engine room is in vacumn. I cannot" + " open the airlock unless you have some suitable" + " protective gear", style="JIM") + else: + return super(ToEngine, self).interact_without() + class ToMachine(DoorThing): "Way to machine room."