Fix the 'close' command in an Openable Room
This commit is contained in:
parent
1df17bd858
commit
4d578df314
1 changed files with 11 additions and 1 deletions
|
|
@ -215,7 +215,17 @@ class OpenableRoom(Room):
|
||||||
Move the 'open_exit' exit to Limbo.
|
Move the 'open_exit' exit to Limbo.
|
||||||
"""
|
"""
|
||||||
the_exit = self.db.open_exit
|
the_exit = self.db.open_exit
|
||||||
if the_exit and (not item or the_exit.key.endswith(item)):
|
|
||||||
|
# If a user is trying to close an item (an automatic close,
|
||||||
|
# item will be None), so we just put in this check here:
|
||||||
|
the_item = self.db.open_item
|
||||||
|
if item and ((the_item and item.lower() ==the_item.lower()) or
|
||||||
|
the_exit.key.lower().endswith(item)):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
|
||||||
|
if the_exit:
|
||||||
if the_exit.location == self: # It is opened and can be closed:
|
if the_exit.location == self: # It is opened and can be closed:
|
||||||
the_exit.location = None
|
the_exit.location = None
|
||||||
if closer:
|
if closer:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue