thing-commands
thing-commands*
thing-contained-commands
- thing-contained-commands*
- thing-actions
- thing-actions*))
+ thing-contained-commands*))
(define thing-commands
(list
;; 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 <thing> (<gameobj>)
;; Can be a boolean or a procedure accepting two arguments
;; (thing-actor whos-acting)
#: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))