X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fgameobj.scm;fp=mudsync%2Fgameobj.scm;h=ebd4db7276c44aecd5b307c10a43edc5f7b48486;hp=64c79f1397b67e34175dd6d6798261401786b49c;hb=f22e3b3e60031ebb8ef6260692bf8c03dcce1c60;hpb=ec50931b9a575c226804c1dccadbf5ad3bc8306b diff --git a/mudsync/gameobj.scm b/mudsync/gameobj.scm index 64c79f1..ebd4db7 100644 --- a/mudsync/gameobj.scm +++ b/mudsync/gameobj.scm @@ -88,8 +88,12 @@ '("in" "inside" "on")))))) ;; Commands we can handle by being something's container - (container-commands #:allocation #:each-subclass - #:init-thunk (build-commands)) + ;; dominant version (goes before everything) + (container-dom-commands #:allocation #:each-subclass + #:init-thunk (build-commands)) + ;; subordinate version (goes after everything) + (container-sub-commands #:allocation #:each-subclass + #:init-thunk (build-commands)) ;; Commands we can handle by being contained by something else (contained-commands #:allocation #:each-subclass @@ -127,7 +131,8 @@ ;; Commands for co-occupants (get-commands gameobj-get-commands) ;; Commands for participants in a room - (get-container-commands gameobj-get-container-commands) + (get-container-dom-commands gameobj-get-container-dom-commands) + (get-container-sub-commands gameobj-get-container-sub-commands) ;; Commands for inventory items, etc (occupants of the gameobj commanding) (get-contained-commands gameobj-get-contained-commands) @@ -224,10 +229,16 @@ Assists in its replacement of occupants if necessary and nothing else." #:commands candidate-commands #:goes-by (gameobj-goes-by actor))) -(define* (gameobj-get-container-commands actor message #:key verb) - "Get commands as the container / room of message's sender" +(define* (gameobj-get-container-dom-commands actor message #:key verb) + "Get (dominant) commands as the container / room of message's sender" (define candidate-commands - (get-candidate-commands actor 'container-commands verb)) + (get-candidate-commands actor 'container-dom-commands verb)) + (<-reply message #:commands candidate-commands)) + +(define* (gameobj-get-container-sub-commands actor message #:key verb) + "Get (subordinate) commands as the container / room of message's sender" + (define candidate-commands + (get-candidate-commands actor 'container-sub-commands verb)) (<-reply message #:commands candidate-commands)) (define* (gameobj-get-contained-commands actor message #:key verb)