Function: dun-press

dun-press is a byte-compiled function defined in dunnet.el.gz.

Signature

(dun-press OBJ)

Source Code

;; Defined in /usr/src/emacs/lisp/play/dunnet.el.gz
(defun dun-press (obj)
  (let ((objnum (dun-objnum-from-args-std obj)))
    (cond
     ((not (or (member objnum (nth dun-current-room dun-room-objects))
               (member objnum (nth dun-current-room dun-room-silents))))
      (dun-mprincl "I don't see that here."))
     ((not (member objnum (list obj-button obj-switch)))
      (dun-mprincl "You can't " (car dun-line-list) " that."))
     ((= objnum obj-button)
      (dun-mprincl
"As you press the button, you notice a passageway open up, but
as you release it, the passageway closes."))
     ((= objnum obj-switch)
      (if dun-black
          (progn
            (dun-mprincl "The button is now in the off position.")
            (setq dun-black nil))
        (dun-mprincl "The button is now in the on position.")
        (setq dun-black t))))))