Add setting to show unlisted console commands
This commit is contained in:
@@ -1618,7 +1618,7 @@ DEF_CONSOLE_CMD(ConListCommands)
|
||||
|
||||
for (const IConsoleCmd *cmd = _iconsole_cmds; cmd != nullptr; cmd = cmd->next) {
|
||||
if (argv[1] == nullptr || strstr(cmd->name, argv[1]) != nullptr) {
|
||||
if (cmd->unlisted == false && (cmd->hook == nullptr || cmd->hook(false) != CHR_HIDE)) IConsolePrintF(CC_DEFAULT, "%s", cmd->name);
|
||||
if ((_settings_client.gui.console_show_unlisted || !cmd->unlisted) && (cmd->hook == nullptr || cmd->hook(false) != CHR_HIDE)) IConsolePrintF(CC_DEFAULT, "%s", cmd->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -221,6 +221,7 @@ struct GUISettings : public TimeSettings {
|
||||
uint8 settings_restriction_mode; ///< selected restriction mode in adv. settings GUI. @see RestrictionMode
|
||||
bool newgrf_show_old_versions; ///< whether to show old versions in the NewGRF list
|
||||
uint8 newgrf_default_palette; ///< default palette to use for NewGRFs without action 14 palette information
|
||||
bool console_show_unlisted; ///< whether to show unlisted console commands
|
||||
|
||||
/**
|
||||
* Returns true when the user has sufficient privileges to edit newgrfs on a running game
|
||||
|
@@ -5034,6 +5034,12 @@ max = 1
|
||||
proc = UpdateNewGRFConfigPalette
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_BOOL]
|
||||
var = gui.console_show_unlisted
|
||||
flags = SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
|
||||
def = false
|
||||
cat = SC_EXPERT
|
||||
|
||||
[SDTC_VAR]
|
||||
var = gui.console_backlog_timeout
|
||||
type = SLE_UINT16
|
||||
|
Reference in New Issue
Block a user