12#define GENERIC_COMMAND(id, description, menubased) \
13 CLASS(genericcommand_##id, Command) \
14 ATTRIB(genericcommand_##id, m_name, string, #id); \
15 ATTRIB(genericcommand_##id, m_description, string, description); \
16 ATTRIB(genericcommand_##id, m_menubased, bool, menubased); \
17 ENDCLASS(genericcommand_##id) \
18 REGISTER(GENERIC_COMMANDS, CMD_G, id, m_id, NEW(genericcommand_##id)); \
19 METHOD(genericcommand_##id, m_invokecmd, void(genericcommand_##id this, int request, entity caller, int arguments, string command))
22 FOREACH(GENERIC_COMMANDS,
true,
localcmd(sprintf(
"alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, ((it.m_menubased) ?
"qc_cmd_svmenu" :
"qc_cmd_svcl"))));
#define FOREACH(list, cond, body)
#define REGISTRY_SORT(...)
#define REGISTER_REGISTRY(id)
#define REGISTRY(id, max)
Declare a new registry.
#define REGISTRY_DEFINE_GET(id, null)
#define STATIC_INIT(func)
during worldspawn