implement doors
[lifp.git] / iflib.lisp
index cfa4d1e358467ee3334024ef4b4ec904a57b4260..dad57f5465c3eeb760326a8cb8d63145820563df 100644 (file)
@@ -22,9 +22,9 @@
 (defpackage :if-lib\r
   (:use :common-lisp :if-basic-lib :if-console)\r
   (:export :container :room :item :clothing :capacity\r
-           :food :switchable\r
+           :food :switchable :door :predoor\r
           :n-to :ne-to :e-to :se-to :s-to :sw-to :w-to :nw-to :in-to :out-to\r
-          :u-to :d-to :cant-go\r
+          :u-to :d-to :cant-go :destination\r
           :*intscope*  :*outscope* :*location* :*trace-light* :*vowels*\r
           :*score* :*gamestate* :*turns* :*dark*\r
            :add-to-scope :add-to-outscope :found-in :seen-from :with-keys\r
@@ -91,7 +91,9 @@
 \r
 ;;SECTION 2: Library-defined classes and objects\r
 \r
-(ifclass container () (capacity integer) (has :container))\r
+(ifclass predoor ()) ;;Can potentially be locked... \r
+\r
+(ifclass container (predoor) (capacity integer) (has :container))\r
 (ifclass supporter () (capacity integer) (has :supporter))\r
 \r
 (ifclass room () (description string)\r
          (look (look self)))\r
        (has :~light))\r
 \r
+(ifclass door (predoor scenery) (destination object) (has :door :closed))\r
+\r
+\r
+\r
 ;;Compass directions\r
 (object compass ())\r
 (object dir-n () "north" (name "north" "n") compass (property 'n-to))\r