X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fthing.scm;h=6963c01b985a2867f7fa89e89a12831ac50dfd70;hp=762775d318a6a16a1ab85a2d65ab49c4c4e63654;hb=701425bc611abaa8b4140942d995d5f32d24e2d7;hpb=aca41e2e3c5ed026c2672e3ac4ac364bbdef19c7 diff --git a/mudsync/thing.scm b/mudsync/thing.scm index 762775d..6963c01 100644 --- a/mudsync/thing.scm +++ b/mudsync/thing.scm @@ -21,7 +21,7 @@ (define-module (mudsync thing) #:use-module (mudsync command) #:use-module (mudsync gameobj) - #:use-module (8sync systems actors) + #:use-module (8sync actors) #:use-module (8sync agenda) #:use-module (oop goops) #:use-module (ice-9 match) @@ -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 + (build-actions + (cmd-take thing-cmd-take) + (cmd-drop thing-cmd-drop)))) (define* (thing-cmd-take thing message #:key direct-obj) (define player (message-from message))