Xonotic
cl_cmd.qh
Go to the documentation of this file.
1 #pragma once
2 
6 
7 // used by common/command/generic.qc:GenericCommand_dumpcommands to list all commands into a .txt file
9 
13 
15 
16 #define CLIENT_COMMAND(id, description) \
17  CLASS(clientcommand_##id, Command) \
18  ATTRIB(clientcommand_##id, m_name, string, #id); \
19  ATTRIB(clientcommand_##id, m_description, string, description); \
20  ENDCLASS(clientcommand_##id) \
21  REGISTER(CLIENT_COMMANDS, CMD_CL, id, m_id, NEW(clientcommand_##id)); \
22  METHOD(clientcommand_##id, m_invokecmd, void(clientcommand_##id this, int request, entity caller, int arguments, string command))
23 
24 STATIC_INIT(CLIENT_COMMANDS_aliases) {
25  FOREACH(CLIENT_COMMANDS, true, localcmd(sprintf("alias %1$s \"%2$s %1$s ${* ?}\"\n", it.m_name, "qc_cmd_cl")));
26 }
void Cmd_Scoreboard_Help()
Definition: scoreboard.qc:357
#define CLIENT_COMMANDS(ent, request, arguments, command)
Definition: cmd.qc:800
#define REGISTRY_SORT(...)
Definition: registry.qh:128
#define REGISTER_REGISTRY(id)
Definition: registry.qh:212
STATIC_INIT(CLIENT_COMMANDS_aliases)
Definition: cl_cmd.qh:24
#define REGISTRY_DEFINE_GET(id, null)
Definition: registry.qh:40
void LocalCommand_macro_write_aliases(int fh)
Definition: cl_cmd.qc:491
#define REGISTRY(id, max)
Declare a new registry.
Definition: registry.qh:26
#define NULL
Definition: post.qh:17
void ConsoleCommand_macro_init()
Definition: cl_cmd.qc:579
#define FOREACH(list, cond, body)
Definition: iter.qh:19
#define BITS(n)
Definition: bits.qh:9
void Cmd_Scoreboard_SetFields(int)
Definition: scoreboard.qc:412