X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fplayer.scm;h=e3ae2ba8ffcee53cea6cef848d72216e5a74fbc4;hp=113770f72aa5d43ce23a34a87c95f4b8adfb5aa1;hb=701425bc611abaa8b4140942d995d5f32d24e2d7;hpb=aca41e2e3c5ed026c2672e3ac4ac364bbdef19c7 diff --git a/mudsync/player.scm b/mudsync/player.scm index 113770f..e3ae2ba 100644 --- a/mudsync/player.scm +++ b/mudsync/player.scm @@ -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) @@ -35,21 +35,6 @@ ;;; 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) @@ -64,9 +49,14 @@ (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