Add setting to disable "big GUI" NewGRFs

This commit is contained in:
Jonathan G Rennison
2021-12-05 13:40:56 +00:00
parent 924ffb013f
commit ff714b7648
3 changed files with 10 additions and 0 deletions

View File

@@ -10525,6 +10525,9 @@ void LoadNewGRF(uint load_index, uint num_baseset)
*/ */
for (GRFConfig *c = _grfconfig; c != nullptr; c = c->next) { for (GRFConfig *c = _grfconfig; c != nullptr; c = c->next) {
if (c->status != GCS_NOT_FOUND) c->status = GCS_UNKNOWN; if (c->status != GCS_NOT_FOUND) c->status = GCS_UNKNOWN;
if (_settings_client.gui.newgrf_disable_big_gui && c->ident.grfid == BSWAP32(0x52577801)) {
c->status = GCS_DISABLED;
}
} }
_cur.spriteid = load_index; _cur.spriteid = load_index;

View File

@@ -258,6 +258,7 @@ struct GUISettings : public TimeSettings {
bool newgrf_show_old_versions; ///< whether to show old versions in the NewGRF list 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 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 bool console_show_unlisted; ///< whether to show unlisted console commands
bool newgrf_disable_big_gui; ///< whether to disable "big GUI" NewGRFs
/** /**
* Returns true when the user has sufficient privileges to edit newgrfs on a running game * Returns true when the user has sufficient privileges to edit newgrfs on a running game

View File

@@ -5399,6 +5399,12 @@ flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def = false def = false
cat = SC_EXPERT cat = SC_EXPERT
[SDTC_BOOL]
var = gui.newgrf_disable_big_gui
flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC
def = false
cat = SC_EXPERT
[SDTC_VAR] [SDTC_VAR]
var = gui.console_backlog_timeout var = gui.console_backlog_timeout
type = SLE_UINT16 type = SLE_UINT16