Fix a bug with door opening.
authorNeil Moore <neil.moore@csurs.csr.uky.edu>
Fri, 6 Jun 2008 18:00:01 +0000 (14:00 -0400)
committerNeil Moore <neil.moore@csurs.csr.uky.edu>
Fri, 6 Jun 2008 18:00:01 +0000 (14:00 -0400)
loc.Door.setattr:  close rather than hide when the 'opened' attr is unset.

loc.py

diff --git a/loc.py b/loc.py
index 695d72a..077a4db 100644 (file)
--- a/loc.py
+++ b/loc.py
@@ -308,7 +308,7 @@ class Door(Tile):
         if attr == 'hidden':
             self.hide() if value else self.unhide()
         elif attr == 'opened':
-            self.open() if value else self.hide()
+            self.open() if value else self.close()
         else:
             raise Exception("Unknown attr %s for %s" % (attr, self.__class__))
     def passable_by(self, thing):