(define clerk-return-to-slacking-text
"The desk clerk enters and slams the door behind her.\n")
+
(define (clerk-act-update-loop clerk message)
(define (tell-room text)
(<- clerk (gameobj-loc clerk) 'tell-room
#:exclude (actor-id clerk)))
(define (loop-if-not-destructed)
(if (not (slot-ref clerk 'destructed))
+ ;; This iterates by "recursing" on itself by calling itself
+ ;; (as the message handler) again. It used to be that we had to do
+ ;; this, because there was a bug where a loop which yielded like this
+ ;; would keep growing the stack due to some parameter goofiness.
+ ;; That's no longer true, but there's an added advantage to this
+ ;; route: it's much more live hackable. If we change the definition
+ ;; of this method, the character will act differently on the next
+ ;; "tick" of the loop.
(<- clerk (actor-id clerk) 'update-loop)))
(match (slot-ref clerk 'state)
('slacking