X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fthing.scm;h=212ad2e11c20963afa6f6c47c057afa561d3b4db;hp=762775d318a6a16a1ab85a2d65ab49c4c4e63654;hb=ca990b14f563fc450548954184ff6fc0e4792739;hpb=e585ab65215e84cb5fa12fd84ffeee0421e56d07 diff --git a/mudsync/thing.scm b/mudsync/thing.scm index 762775d..212ad2e 100644 --- a/mudsync/thing.scm +++ b/mudsync/thing.scm @@ -30,9 +30,7 @@ thing-commands thing-commands* thing-contained-commands - thing-contained-commands* - thing-actions - thing-actions*)) + thing-contained-commands*)) (define thing-commands (list @@ -50,18 +48,6 @@ ;; so it's an alias. (define thing-contained-commands* thing-contained-commands) -(define thing-actions - (build-actions - (cmd-take (wrap-apply thing-cmd-take)) - (cmd-drop (wrap-apply thing-cmd-drop)))) - -(define thing-actions* - (append thing-actions - gameobj-actions)) - -(define thing-dispatcher - (simple-dispatcher thing-actions*)) - (define-class () ;; Can be a boolean or a procedure accepting two arguments ;; (thing-actor whos-acting) @@ -75,9 +61,11 @@ #:init-value (wrap thing-commands)) (contained-commands #:init-value (wrap thing-contained-commands)) - (message-handler - #:init-value - (wrap-apply thing-dispatcher))) + (actions #:allocation #:each-subclass + #:init-value + (mhandlers + (cmd-take thing-cmd-take) + (cmd-drop thing-cmd-drop)))) (define* (thing-cmd-take thing message #:key direct-obj) (define player (message-from message))