X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=iflib.lisp;h=cfa4d1e358467ee3334024ef4b4ec904a57b4260;hb=3c7a7c60eee66182da5b409ddd78c5349992c334;hp=39f4d507fba3e2b4064417124cc01a289d74af05;hpb=3c1330430d88e67fce6b6c69a261beb6f93868ea;p=lifp.git diff --git a/iflib.lisp b/iflib.lisp index 39f4d50..cfa4d1e 100644 --- a/iflib.lisp +++ b/iflib.lisp @@ -27,7 +27,7 @@ :u-to :d-to :cant-go :*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 @@ -79,9 +79,15 @@ "Turns passed since beginning of the game") (defparameter *player* nil - "Current player object (will be initialised later") + "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") +(defvar *library-file-iflib* "iflib.fas") +(defvar *library-file-verbs* "verbs.fas") ;;SECTION 2: Library-defined classes and objects @@ -634,12 +640,12 @@ (defun lib (file dir) "Reloads the IF library" (format t "[DIRECTORY: ~a]~%" dir) - (print-message "Loading if.fas...") - (load (merge-pathnames dir "if.fas")) - (print-message "Loading iflib.fas...") - (load (merge-pathnames dir "iflib.fas")) - (print-message "Loading verbs.fas...") - (load (merge-pathnames dir "verbs.fas")) + (print-message "Loading if-basic-lib...") + (load (merge-pathnames dir *library-file-if*)) + (print-message "Loading if-lib...") + (load (merge-pathnames dir *library-file-iflib*)) + (print-message "Loading verbs...") + (load (merge-pathnames dir *library-file-verbs*)) (print-message "Loading game module...") (load file) (print-message "Module is successfully loaded.")) @@ -675,7 +681,7 @@ `(defpackage ,name (:use :common-lisp :if-basic-lib :if-lib :verb-lib ,@other-packages) (:shadowing-import-from :if-lib :room) - (:shadowing-import-from :verb-lib :listen :fill))) + (:shadowing-import-from :verb-lib :listen :fill :open :close))) (defmacro free-symbol (id) "Frees a symbol from current package using shadow"