blob: 59e9c44d4de7ff9636b8c4c71de5ffa8146d8b2e [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
Zesstrad59c3892019-11-28 20:53:39 +01002 #include <commands.h>
3 #include <sent.h>
MG Mud User88f12472016-06-24 23:31:02 +02004
Zesstra715ec202025-07-09 22:18:31 +02005 mixed * query_actions(object ob, mixed mask_or_verb)
MG Mud User88f12472016-06-24 23:31:02 +02006
Zesstra715ec202025-07-09 22:18:31 +02007DESCRIPTION
8 query_actions takes either an object or a filename as first
9 argument and a bitmask (int) or string as a second argument.
10 If the second argument is a string, query_actions() will return
11 an array containing information (see below) on the verb or
12 zero if the living object "ob" cannot use the verb. If the
13 second argument is a bitmask, query_actions() will return a
14 flat array containing information on all verbs added to ob.
15 The second argument is optional (default is QA_VERB).
16 QA_VERB ( 1): the verb
17 QA_TYPE ( 2): type
18 QA_SHORT_VERB ( 4): short_verb
19 QA_OBJECT ( 8): object
20 QA_FUNCTION (16): function
MG Mud User88f12472016-06-24 23:31:02 +020021
Zesstra715ec202025-07-09 22:18:31 +020022 "type" is one of the values defined in <sent.h>
23 (which is provided with the parser source).
MG Mud User88f12472016-06-24 23:31:02 +020024
Zesstra715ec202025-07-09 22:18:31 +020025 SENT_PLAIN added with add_action (fun, cmd);
26 SENT_SHORT_VERB added with add_action (fun, cmd, AA_SHORT);
27 SENT_NO_SPACE added with add_action (fun, AA_NOSPACE);
28 SENT_MARKER internal, won't be in the returned array
29 negative value: The verb given by the player has to match only
30 the leading -<value> characters of the action's verb.
MG Mud User88f12472016-06-24 23:31:02 +020031
Zesstra715ec202025-07-09 22:18:31 +020032SEE ALSO
MG Mud User88f12472016-06-24 23:31:02 +020033 add_action(E), init(A)