]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/common/command/all.qh
Merge branch 'master' into terencehill/hud_cleanups
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / command / all.qh
1 #ifndef COMMON_COMMANDS_ALL_H
2 #define COMMON_COMMANDS_ALL_H
3
4 #include "command.qh"
5 REGISTRY(GENERIC_COMMANDS, 50)
6 REGISTER_REGISTRY(RegisterGENERIC_COMMANDS)
7 REGISTRY_SORT(GENERIC_COMMANDS, m_name, 0)
8
9 #define GENERIC_COMMAND(id, description) \
10         CLASS(genericcommand_##id, Command) \
11                 ATTRIB(genericcommand_##id, m_name, string, #id); \
12         ATTRIB(genericcommand_##id, m_description, string, description); \
13         ENDCLASS(genericcommand_##id) \
14     REGISTER(RegisterGENERIC_COMMANDS, CMD_G, GENERIC_COMMANDS, id, m_id, NEW(genericcommand_##id)); \
15         METHOD(genericcommand_##id, m_invokecmd, void(int request, int arguments, string command))
16
17 STATIC_INIT(GENERIC_COMMANDS_aliases) {
18         FOREACH(GENERIC_COMMANDS, true, LAMBDA(localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_svmenu"))));
19 }
20
21 #include "generic.qh"
22 #include "markup.qh"
23 #include "rpn.qh"
24
25 #endif