X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=iflib.lisp;h=dad57f5465c3eeb760326a8cb8d63145820563df;hb=447a18ccfc600c416a481266ecac28cd2ecd720f;hp=853d89d22a1b94182d99650ab67cbc9c0a181900;hpb=e4d49c347b683ad27be42750e0d9117384fb6c23;p=lifp.git diff --git a/iflib.lisp b/iflib.lisp index 853d89d..dad57f5 100644 --- a/iflib.lisp +++ b/iflib.lisp @@ -22,12 +22,12 @@ (defpackage :if-lib (:use :common-lisp :if-basic-lib :if-console) (:export :container :room :item :clothing :capacity - :food :switchable + :food :switchable :door :predoor :n-to :ne-to :e-to :se-to :s-to :sw-to :w-to :nw-to :in-to :out-to - :u-to :d-to :cant-go + :u-to :d-to :cant-go :destination :*intscope* :*outscope* :*location* :*trace-light* :*vowels* :*score* :*gamestate* :*turns* :*dark* - :add-to-scope :add-to-outscope :found-in :seen-from + :add-to-scope :add-to-outscope :found-in :seen-from :with-keys :compass :dir-n :dir-ne :dir-e :dir-se :dir-s :dir-sw :dir-w :dir-nw :dir-u :dir-d :dir-in :dir-out :darkness :lit :transparent :passable @@ -81,8 +81,8 @@ (defparameter *player* nil "Current player object (will be initialised later)") -(declare-predicate add-to-scope add-to-outscope found-in seen-from) - +(declare-predicate add-to-scope add-to-outscope found-in seen-from + with-keys) ;;Library file names (defvar *library-file-if* "if.fas") @@ -91,7 +91,9 @@ ;;SECTION 2: Library-defined classes and objects -(ifclass container () (capacity integer) (has :container)) +(ifclass predoor ()) ;;Can potentially be locked... + +(ifclass container (predoor) (capacity integer) (has :container)) (ifclass supporter () (capacity integer) (has :supporter)) (ifclass room () (description string) @@ -118,6 +120,10 @@ (look (look self))) (has :~light)) +(ifclass door (predoor scenery) (destination object) (has :door :closed)) + + + ;;Compass directions (object compass ()) (object dir-n () "north" (name "north" "n") compass (property 'n-to))