]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/events.qh
Add a hook for custom gameplay tips
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / events.qh
index e193d5f8a0e125eacdf657da5d0869e76dc1b812..8a5c153ad7024f7eb1ae6c728b6243e4869438df 100644 (file)
@@ -3,8 +3,28 @@
 
 #define EV_NO_ARGS(i, o)
 
+#pragma noref 1
 string ret_string;
 
+#define MUTATOR_TYPES(_, x) \
+    _(x, bool) \
+    _(x, int) \
+    _(x, entity) \
+    _(x, float) \
+    _(x, vector) \
+    _(x, string) \
+    /**/
+
+#define MUTATOR_NEWGLOBAL(x, type) type mutator_argv_##type##_##x;
+
+MUTATOR_TYPES(MUTATOR_NEWGLOBAL, 0)
+MUTATOR_TYPES(MUTATOR_NEWGLOBAL, 1)
+
+#undef MUTATOR_TYPES
+#undef MUTATOR_NEWGLOBAL
+
+#pragma noref 0
+
 /** appends ":mutatorname" to ret_string for logging */
 #define EV_BuildMutatorsString(i, o) \
     /**/ i(string, ret_string) \
@@ -19,4 +39,11 @@ MUTATOR_HOOKABLE(BuildMutatorsString, EV_BuildMutatorsString);
     /**/
 MUTATOR_HOOKABLE(BuildMutatorsPrettyString, EV_BuildMutatorsPrettyString);
 
+/** appends mutator string for displaying extra gameplay tips */
+#define EV_BuildGameplayTipsString(i, o) \
+    /**/ i(string, ret_string) \
+    /**/ o(string, ret_string) \
+    /**/
+MUTATOR_HOOKABLE(BuildGameplayTipsString, EV_BuildGameplayTipsString);
+
 #endif