diff options
author | frosch <frosch@openttd.org> | 2011-05-11 20:23:37 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-05-11 20:23:37 +0000 |
commit | 2cec96388cda14183941bdb8362518c84bc6e905 (patch) | |
tree | f20dc95491c951e8ddceaa2d668b7737d19f0bbe /src/newgrf.cpp | |
parent | 67b9eda8c6df7b0a1ce07355dad2e61250d78cc2 (diff) | |
download | openttd-2cec96388cda14183941bdb8362518c84bc6e905.tar.xz |
(svn r22444) -Add: When GRFs are disabled via Action E or due to GRM failure, also display an error in the GUI.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r-- | src/newgrf.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index eba446b4e..e837ba078 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -5758,7 +5758,7 @@ static uint32 PerformGRM(uint32 *grm, uint16 num_ids, uint16 count, uint8 op, ui if (op != 4 && op != 5) { /* Deactivate GRF */ grfmsg(0, "ParamSet: GRM: Unable to allocate %d %s, deactivating", count, type); - DisableGrf(); + DisableGrf(STR_NEWGRF_ERROR_GRM_FAILED); return UINT_MAX; } @@ -5833,7 +5833,7 @@ static void ParamSet(ByteReader *buf) /* Check if the allocated sprites will fit below the original sprite limit */ if (_cur_spriteid + count >= 16384) { grfmsg(0, "ParamSet: GRM: Unable to allocate %d sprites; try changing NewGRF order", count); - DisableGrf(); + DisableGrf(STR_NEWGRF_ERROR_GRM_FAILED); return; } @@ -6110,7 +6110,7 @@ static void GRFInhibit(ByteReader *buf) /* Unset activation flag */ if (file != NULL && file != _cur_grfconfig) { grfmsg(2, "GRFInhibit: Deactivating file '%s'", file->filename); - GRFError *error = DisableGrf(STR_NULL, file); + GRFError *error = DisableGrf(STR_NEWGRF_ERROR_FORCEFULLY_DISABLED, file); error->data = strdup(_cur_grfconfig->GetName()); } } |