X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fcommand.scm;fp=mudsync%2Fcommand.scm;h=23e21dac8f85fc75645cc18620e0613dba0818d9;hp=31687389cf9a17af83e2f02e318d2f28b377100b;hb=10ff4122c37899d011ded00c5ebe1333f2477a34;hpb=9277ba45abf6c359bc7465bca2c6d74c166aca32 diff --git a/mudsync/command.scm b/mudsync/command.scm index 3168738..23e21da 100644 --- a/mudsync/command.scm +++ b/mudsync/command.scm @@ -33,6 +33,7 @@ direct-command indir-command + indir-as-direct-command loose-direct-command loose-indir-command empty-command @@ -101,6 +102,18 @@ action %high-priority)) +(define* (indir-as-direct-command verbs action #:optional prepositions) + (make-command verbs + cmatch-indir-obj + (lambda* (goes-by #:key direct-obj indir-obj preposition) + (if prepositions + (and + (member direct-obj goes-by) + (member preposition prepositions)) + (member direct-obj goes-by))) + action + %high-priority)) + (define* (loose-indir-command verbs action #:optional prepositions) (make-command verbs cmatch-indir-obj