X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=worlds%2Fbricabrac.scm;h=84836fa7690ab0c19d81eeca9105f70ed3b1716d;hp=d458327d3cd72d97d45f6b0cccb0f0bde8240bef;hb=e585ab65215e84cb5fa12fd84ffeee0421e56d07;hpb=aca41e2e3c5ed026c2672e3ac4ac364bbdef19c7 diff --git a/worlds/bricabrac.scm b/worlds/bricabrac.scm index d458327..84836fa 100644 --- a/worlds/bricabrac.scm +++ b/worlds/bricabrac.scm @@ -674,6 +674,7 @@ attend to.\n") (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 @@ -681,6 +682,14 @@ attend to.\n") #: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