(svn r21116) -Add [FS#3012]: Reduce the chances to accidentially break savegames with NewGRFs

This commit is contained in:
planetmaker
2010-11-07 21:46:41 +00:00
parent b9ccf6dccc
commit 5565ae1ac0
5 changed files with 32 additions and 18 deletions

View File

@@ -516,7 +516,7 @@ public:
break;
case SLWW_LOAD_BUTTON:
if (this->selected != NULL && !_load_check_data.HasErrors()) {
if (this->selected != NULL && !_load_check_data.HasErrors() && (_load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs())) {
_switch_mode = (_game_mode == GM_EDITOR) ? SM_LOAD_SCENARIO : SM_LOAD;
const char *name = FiosBrowseTo(this->selected);
@@ -665,7 +665,7 @@ public:
/* 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());
this->selected == NULL || _load_check_data.HasErrors() || !(_load_check_data.grf_compatibility != GLC_NOT_FOUND || _settings_client.gui.UserIsAllowedToChangeNewGRFs()));
this->SetWidgetDisabledState(SLWW_NEWGRF_INFO,
!_load_check_data.HasNewGrfs());
}