X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fplayer.scm;fp=mudsync%2Fplayer.scm;h=8bf75b2c0e9e59100ae2a8dd3dec465d7152674c;hp=113770f72aa5d43ce23a34a87c95f4b8adfb5aa1;hb=ca990b14f563fc450548954184ff6fc0e4792739;hpb=e585ab65215e84cb5fa12fd84ffeee0421e56d07 diff --git a/mudsync/player.scm b/mudsync/player.scm index 113770f..8bf75b2 100644 --- a/mudsync/player.scm +++ b/mudsync/player.scm @@ -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 + (mhandlers + (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