summaryrefslogtreecommitdiff
path: root/src/fios_gui.cpp
diff options
context:
space:
mode:
authorplanetmaker <planetmaker@openttd.org>2010-11-07 21:46:41 +0000
committerplanetmaker <planetmaker@openttd.org>2010-11-07 21:46:41 +0000
commit5565ae1ac0d41c95812fe1a1713188a200d75876 (patch)
tree8940467fc369492be882448b48326c7764bb1bbe /src/fios_gui.cpp
parentb9ccf6dcccd6336dd24e6ed5d4cd02d93526c7c8 (diff)
downloadopenttd-5565ae1ac0d41c95812fe1a1713188a200d75876.tar.xz
(svn r21116) -Add [FS#3012]: Reduce the chances to accidentially break savegames with NewGRFs
Diffstat (limited to 'src/fios_gui.cpp')
-rw-r--r--src/fios_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fios_gui.cpp b/src/fios_gui.cpp
index 7e7dd2543..b0b8d8657 100644
--- a/src/fios_gui.cpp
+++ b/src/fios_gui.cpp
@@ -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());
}