X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=iflib.lisp;h=0684f32c18e601843949eae2649459ac8d84539c;hb=1f02beed487906a8be49f59dff91d16e7e5fd775;hp=1a1059d427b4ecf4b0ecea96e5de3da7251f9e6d;hpb=d6621d9c4fedfc95669395bc7c40e43c70e62069;p=lifp.git diff --git a/iflib.lisp b/iflib.lisp index 1a1059d..0684f32 100644 --- a/iflib.lisp +++ b/iflib.lisp @@ -83,6 +83,12 @@ (declare-predicate add-to-scope add-to-outscope found-in seen-from) + +;;Library file names +(defvar *library-file-if* "if.fas") +(defvar *library-file-iflib* "if.fas") +(defvar *library-file-verbs* "if.fas") + ;;SECTION 2: Library-defined classes and objects (ifclass container () (capacity integer) (has :container)) @@ -634,19 +640,19 @@ (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.")) -(defun test-seq (&optional (rm nil)) +(defun test-seq (&optional (rm *repl-mode*)) "Test sequence emulating interactive fiction interpreter" - (load-cfg "iflib.cfg") + ;;(load-cfg "iflib.cfg") (setf *score* 0 *turns* 0 *gamestate* 0) @@ -663,8 +669,9 @@ (defun interactive-start () "Function intended to be used by user" (load-cfg "iflib.cfg") - (run-console #'seq #'lib :interactive t) - (when *hard-quit* (quit-lisp))) + (unless *repl-mode* + (run-console #'seq #'lib :interactive t) + (when *hard-quit* (quit-lisp)))) ;;SECTION 9: Other stuff