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

Function ConSetting

src/console_cmds.cpp:2386–2403  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2384}
2385
2386static bool ConSetting(std::span<std::string_view> argv)
2387{
2388 if (argv.empty()) {
2389 IConsolePrint(CC_HELP, "Change setting for all clients. Usage: 'setting <name> [<value>]'.");
2390 IConsolePrint(CC_HELP, "Omitting <value> will print out the current value of the setting.");
2391 return true;
2392 }
2393
2394 if (argv.size() == 1 || argv.size() > 3) return false;
2395
2396 if (argv.size() == 2) {
2397 IConsoleGetSetting(argv[1]);
2398 } else {
2399 IConsoleSetSetting(argv[1], argv[2]);
2400 }
2401
2402 return true;
2403}
2404
2405static bool ConSettingNewgame(std::span<std::string_view> argv)
2406{

Callers

nothing calls this directly

Calls 5

IConsoleGetSettingFunction · 0.85
IConsoleSetSettingFunction · 0.85
IConsolePrintFunction · 0.70
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected