diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp --- a/src/fios_gui.cpp +++ b/src/fios_gui.cpp @@ -36,6 +36,12 @@ static bool _fios_path_changed; static bool _savegame_sort_dirty; +bool AllowLoadChangedNewGRF() +{ + return _load_check_data.grf_compatibility == GLC_ALL_GOOD || _settings_client.gui.scenario_developer || + (_load_check_data.grf_compatibility <= GLC_COMPATIBLE && _settings_client.gui.load_compatible); +} + /** * Reset read data. @@ -516,7 +522,7 @@ break; case SLWW_LOAD_BUTTON: - if (this->selected != NULL && !_load_check_data.HasErrors() && (_load_check_data.grf_compatibility == GLC_ALL_GOOD || _settings_client.gui.scenario_developer)) { + if (this->selected != NULL && !_load_check_data.HasErrors() && AllowLoadChangedNewGRF()) { _switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD; const char *name = FiosBrowseTo(this->selected); @@ -665,7 +671,7 @@ /* Selection changes */ if (_saveload_mode == SLD_LOAD_GAME || _saveload_mode == SLD_LOAD_SCENARIO) { this->SetWidgetDisabledState(SLWW_LOAD_BUTTON, - this->selected == NULL || _load_check_data.HasErrors() || !(_load_check_data.grf_compatibility == GLC_ALL_GOOD || _settings_client.gui.scenario_developer)); + this->selected == NULL || _load_check_data.HasErrors() || !AllowLoadChangedNewGRF()); this->SetWidgetDisabledState(SLWW_NEWGRF_INFO, !_load_check_data.HasNewGrfs()); } diff --git a/src/lang/english.txt b/src/lang/english.txt --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1209,6 +1209,7 @@ STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU_OFF :Off STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING :{LTBLUE}Left-click scrolling: {ORANGE}{STRING1} +STR_CONFIG_SETTING_LOAD_COMPATIBLE :{LTBLUE}Allow to load games with compatible NewGRF: {ORANGE}{STRING1} STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES :{LTBLUE}Use the {ORANGE}{STRING1}{LTBLUE} date format for savegame names. STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES_LONG :long (31st Dec 2008) diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -1267,6 +1267,7 @@ static SettingsPage _settings_ui_display_page = {_settings_ui_display, lengthof(_settings_ui_display)}; static SettingEntry _settings_ui_interaction[] = { + SettingEntry("gui.load_compatible"), SettingEntry("gui.window_snap_radius"), SettingEntry("gui.window_soft_limit"), SettingEntry("gui.link_terraform_toolbar"), diff --git a/src/settings_type.h b/src/settings_type.h --- a/src/settings_type.h +++ b/src/settings_type.h @@ -80,6 +80,7 @@ uint8 scrollwheel_multiplier; ///< how much 'wheel' per incoming event from the OS? bool timetable_arrival_departure; ///< show arrivals and departures in vehicle timetables bool left_mouse_btn_scrolling; ///< left mouse button scroll + bool load_compatible; ///< load games where compatible NewGRFs are found bool pause_on_newgame; ///< whether to start new games paused or not bool enable_signal_gui; ///< show the signal GUI when the signal button is pressed Year coloured_news_year; ///< when does newspaper become coloured? diff --git a/src/table/settings.h b/src/table/settings.h --- a/src/table/settings.h +++ b/src/table/settings.h @@ -562,6 +562,7 @@ SDTC_BOOL(gui.reverse_scroll, S, 0, false, STR_CONFIG_SETTING_REVERSE_SCROLLING, NULL), SDTC_BOOL(gui.smooth_scroll, S, 0, false, STR_CONFIG_SETTING_SMOOTH_SCROLLING, NULL), SDTC_BOOL(gui.left_mouse_btn_scrolling, S, 0, false, STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING, NULL), + SDTC_BOOL(gui.load_compatible, S, 0, false, STR_CONFIG_SETTING_LOAD_COMPATIBLE, NULL), SDTC_BOOL(gui.measure_tooltip, S, 0, true, STR_CONFIG_SETTING_MEASURE_TOOLTIP, NULL), SDTC_VAR(gui.errmsg_duration, SLE_UINT8, S, 0, 5, 0, 20, 0, STR_CONFIG_SETTING_ERRMSG_DURATION, NULL), SDTC_VAR(gui.hover_delay, SLE_UINT8, S, D0, 2, 1, 5, 0, STR_CONFIG_SETTING_HOVER_DELAY, NULL),