MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetCommandName

Function GetCommandName

src/command.cpp:132–137  ·  view source on GitHub ↗

* This function mask the parameter with CMD_ID_MASK and returns * the name which belongs to the given command. * * @param cmd The integer value of the command * @return The name for this command */

Source from the content-addressed store, hash-verified

130 * @return The name for this command
131 */
132std::string_view GetCommandName(Commands cmd)
133{
134 assert(IsValidCommand(cmd));
135
136 return _command_proc_table[cmd].name;
137}
138
139/**
140 * Returns whether the command is allowed while the game is paused.

Callers 3

LogCommandExecutionMethod · 0.85
SendCmdNamesMethod · 0.85
NetworkGameLoopFunction · 0.85

Calls 1

IsValidCommandFunction · 0.85

Tested by

no test coverage detected