diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 1e573ef5a6..4a540ed577 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -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); } } diff --git a/src/settings_type.h b/src/settings_type.h index 7fa9a0c9e7..c544f6d553 100644 --- a/src/settings_type.h +++ b/src/settings_type.h @@ -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 diff --git a/src/table/settings.ini b/src/table/settings.ini index 975ff1dd60..d855965f1a 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -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