various bugfixes + updated example
[lifp.git] / iflib.lisp
index dad57f5465c3eeb760326a8cb8d63145820563df..0154b718e83198fb3af6b7c2042da93f41f87c8e 100644 (file)
          (look (look self)))\r
        (has :~light))\r
 \r
-(ifclass door (predoor scenery) (destination object) (has :door :closed))\r
+(ifclass door (predoor scenery) (destination object) \r
+         (has :door :closed :openable))\r
 \r
 \r
 \r
 \r
 (defun transparent (obj)\r
   "Whether the object is transparent"\r
-  (or (has obj :container :open\r
+  (or (and (has obj :container) (hasnt obj :closed)\r
       (has obj :supporter)\r
       (has obj :transparent)\r
       (eql obj *player*)))\r
       (seep1 actor obj)))\r
 \r
 (defun passable (obj)\r
-  (or (has obj :container :open)\r
+  (or (and (has obj :container) (hasnt obj :closed))\r
       (has obj :supporter)\r
       (eql obj *player*)))\r
 \r
 (defun print-inside (obj stream)\r
   "Return the string containing the status of contents of the object"\r
   (when (has obj :container)\r
-    (if (or (has obj :open) (has obj :transparent))\r
+    (if (or (hasnt obj :closed) (has obj :transparent))\r
        (if (children obj)\r
          (progn (princ " (containing " stream) \r
                 (princ (list-contents obj) stream) \r