X-Git-Url: https://jxself.org/git/?p=mudsync.git;a=blobdiff_plain;f=mudsync%2Fcommand.scm;h=23e21dac8f85fc75645cc18620e0613dba0818d9;hp=31687389cf9a17af83e2f02e318d2f28b377100b;hb=5128272343835236d5e3410e12728cb2efe5a39f;hpb=f1a3d508745069bceecb02cb475c0104020dce16 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