Update to use build-actions; fix clerk communication
[mudsync.git] / worlds / bricabrac.scm
index e5392aaa428222699a8012e7046e48c76545d20a..daf63539ab8dadc8663fbdb47755d40d775b2c85 100644 (file)
@@ -20,7 +20,7 @@
 
 (use-modules (mudsync)
              (mudsync parser)
-             (8sync systems actors)
+             (8sync actors)
              (8sync agenda)
              (oop goops)
              (ice-9 control)
@@ -60,7 +60,7 @@
   (commands
    #:init-value readable-commands*)
   (actions #:allocation #:each-subclass
-           #:init-value (mhandlers
+           #:init-value (build-actions
                          (cmd-read readable-cmd-read))))
 
 (define (readable-cmd-read actor message)
@@ -108,7 +108,7 @@ or 'skribe'?  Now *that's* composition!"))
    #:init-value chat-commands)
   (actions #:allocation #:each-subclass
            #:init-value
-           (mhandlers
+           (build-actions
             (cmd-chat npc-chat-randomly))))
 
 (define random-bricabrac
@@ -128,7 +128,7 @@ or 'skribe'?  Now *that's* composition!"))
     (prep-direct-command "sign" 'cmd-sign-form
                          '("as"))))
   (actions #:allocation #:each-subclass
-           #:init-value (mhandlers
+           #:init-value (build-actions
                          (cmd-sign-form sign-cmd-sign-in))))
 
 
@@ -173,7 +173,7 @@ character.\n")))
   (commands
    #:init-value summoning-bell-commands*)
   (actions #:allocation #:each-subclass
-           #:init-value (mhandlers
+           #:init-value (build-actions
                          (cmd-ring summoning-bell-cmd-ring))))
 
 (define* (summoning-bell-cmd-ring bell message . _)
@@ -385,7 +385,7 @@ if this room is intended for children or child-like adults."
    (list
     (direct-command "sit" 'cmd-sit-furniture)))
   (actions #:allocation #:each-subclass
-           #:init-value (mhandlers
+           #:init-value (build-actions
                          (cmd-sit-furniture furniture-cmd-sit))))
 
 (define* (furniture-cmd-sit actor message #:key direct-obj)
@@ -484,7 +484,7 @@ seat in the room, though."
   (commands #:init-value clerk-commands*)
   (patience #:init-value 0)
   (actions #:allocation #:each-subclass
-           #:init-value (mhandlers
+           #:init-value (build-actions
                          (init clerk-act-init)
                          (cmd-chat clerk-cmd-chat)
                          (cmd-ask-incomplete clerk-cmd-ask-incomplete)
@@ -555,7 +555,8 @@ with tuition at where it is..."))
 (define clerk-doesnt-know-text
   "The clerk apologizes and says she doesn't know about that topic.\n")
 
-(define (clerk-cmd-ask clerk message indir-obj)
+(define* (clerk-cmd-ask clerk message #:key indir-obj
+                        #:allow-other-keys)
   (match (slot-ref clerk 'state)
     ('on-duty
      (match (assoc (pk 'indir indir-obj) clerk-help-topics)