more door bugs
Wed Aug 2 04:12:36 PDT 2006 grue@mail.ru
* more door bugs
diff -rN -u old-lifp/iflib.lisp new-lifp/iflib.lisp
--- old-lifp/iflib.lisp 2014-07-26 06:13:52.000000000 -0700
+++ new-lifp/iflib.lisp 2014-07-26 06:13:52.000000000 -0700
@@ -100,7 +100,7 @@
(n-to object) (ne-to object) (e-to object) (se-to object)
(s-to object) (sw-to object) (w-to object) (nw-to object)
(u-to object) (d-to object) (in-to object) (out-to object)
- (cant-go string)
+ ;(cant-go string) <- doesn't provide by default
(has :light :enterable))
(ifclass item () (description string) (article string)
@@ -356,7 +356,7 @@
(defun default-glance (obj)
"Default initial description of object"
- (format t "[Default glance for ~a]~%" obj)
+ ;;(format t "[Default glance for ~a]~%" obj)
(sprint "~a~%"
(with-output-to-string (out)
(princ "There is " out) (princ (print-name obj) out)
diff -rN -u old-lifp/verbs.lisp new-lifp/verbs.lisp
--- old-lifp/verbs.lisp 2014-07-26 06:13:52.000000000 -0700
+++ new-lifp/verbs.lisp 2014-07-26 06:13:52.000000000 -0700
@@ -205,7 +205,7 @@
(defaction go-to (dir)
(let ((destination (read-property *location* (property dir))))
- (if destination (exec go-to-dispatch (destination))
+ (if destination (exec go-to-dispatch (destination) :str t)
(if (provides *location* 'cant-go)
(read-property *location* 'cant-go)
"You can't go here."))))
@@ -217,9 +217,10 @@
(go-to-room dest))
(defmethod go-to-dispatch ((dest door))
+ ;(format t "go-to-dispatch: ~a~%" dest)
(unless (has dest :door) (return-from go-to-dispatch (call-next-method)))
(if (has dest :closed) (format nil "~a is closed." (the-name dest :capital t))
- (run-action 'pass *args*)))
+ (run-action 'pass (list dest))))
(defaction pass (obj)
"Something's wrong happened.")