]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/mutators/events.qh
Merge branch 'terencehill/quickmenu_file_example' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / events.qh
1 #ifndef COMMON_MUTATORS_EVENTS_H
2 #define COMMON_MUTATORS_EVENTS_H
3
4 #define EV_NO_ARGS(i, o)
5
6 #pragma noref 1
7 string ret_string;
8
9 #define MUTATOR_TYPES(_, x) \
10     _(x, bool) \
11     _(x, int) \
12     _(x, entity) \
13     _(x, float) \
14     _(x, vector) \
15     _(x, string) \
16     /**/
17
18 #define MUTATOR_ARGV(x, type) MUTATOR_ARGV_##x##_##type
19 #define MUTATOR_NEWGLOBAL(x, type) type MUTATOR_ARGV(x, type);
20
21 MUTATOR_TYPES(MUTATOR_NEWGLOBAL, 0)
22 MUTATOR_TYPES(MUTATOR_NEWGLOBAL, 1)
23 MUTATOR_TYPES(MUTATOR_NEWGLOBAL, 2)
24
25 #undef MUTATOR_TYPES
26 #undef MUTATOR_NEWGLOBAL
27
28 #pragma noref 0
29
30 /** appends ":mutatorname" to ret_string for logging */
31 #define EV_BuildMutatorsString(i, o) \
32     /**/ i(string, ret_string) \
33     /**/ o(string, ret_string) \
34     /**/
35 MUTATOR_HOOKABLE(BuildMutatorsString, EV_BuildMutatorsString);
36
37 /** appends ", Mutator name" to ret_string for display */
38 #define EV_BuildMutatorsPrettyString(i, o) \
39     /**/ i(string, ret_string) \
40     /**/ o(string, ret_string) \
41     /**/
42 MUTATOR_HOOKABLE(BuildMutatorsPrettyString, EV_BuildMutatorsPrettyString);
43
44 /** appends mutator string for displaying extra gameplay tips */
45 #define EV_BuildGameplayTipsString(i, o) \
46     /**/ i(string, ret_string) \
47     /**/ o(string, ret_string) \
48     /**/
49 MUTATOR_HOOKABLE(BuildGameplayTipsString, EV_BuildGameplayTipsString);
50
51 #endif