Rename call of start-agenda to run-agenda
[mudsync.git] / mudsync / player.scm
index 844aaf96f031fbf4112a05b602a3bd5e0f4e5813..e3ae2ba8ffcee53cea6cef848d72216e5a74fbc4 100644 (file)
@@ -21,7 +21,7 @@
   #:use-module (mudsync gameobj)
   #:use-module (mudsync game-master)
   #:use-module (mudsync parser)
-  #:use-module (8sync systems actors)
+  #:use-module (8sync actors)
   #:use-module (8sync agenda)
   #:use-module (ice-9 control)
   #:use-module (ice-9 format)
 ;;; Players
 ;;; =======
 
-(define player-actions
-  (build-actions
-   (init (wrap-apply player-init))
-   (handle-input (wrap-apply player-handle-input))
-   (tell (wrap-apply player-tell))
-   (disconnect-self-destruct (wrap-apply player-disconnect-self-destruct))
-   (cmd-inventory (wrap-apply player-cmd-inventory))))
-
-(define player-actions*
-  (append player-actions
-          gameobj-actions))
-
-(define player-dispatcher
-  (simple-dispatcher player-actions*))
-
 (define player-self-commands
   (list
    (empty-command "inventory" 'cmd-inventory)
 
   (self-commands #:init-value player-self-commands)
 
-  (message-handler
-   #:init-value
-   (wrap-apply player-dispatcher)))
+  (actions #:allocation #:each-subclass
+           #:init-value
+           (build-actions
+            (init player-init)
+            (handle-input player-handle-input)
+            (tell player-tell)
+            (disconnect-self-destruct player-disconnect-self-destruct)
+            (cmd-inventory player-cmd-inventory))))
 
 
 ;;; player message handlers
   (define inv-names
     (map
      (lambda (inv-item)
-       (msg-receive (_ #:key val)
-           (<-wait player inv-item 'get-name)
-         val))
+       (msg-val (<-wait player inv-item 'get-name)))
      (gameobj-occupants player)))
   (define text-to-show
     (if (eq? inv-names '())