mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r17143) -Fix [FS#3097]: NewGRFs sometimes got the wrong string causing crashes later on
This commit is contained in:
parent
40a8bd556e
commit
b8954b84bd
@ -303,8 +303,19 @@ StringID MapGRFStringID(uint32 grfid, StringID str)
|
||||
TEXID_TO_STRINGID(0x2036, 0x2041, STR_TOWN_BUILDING_NAME_COTTAGES_1);
|
||||
TEXID_TO_STRINGID(0x2059, 0x205C, STR_TOWN_BUILDING_NAME_IGLOO_1);
|
||||
|
||||
/* Same thing for industries, since the introduction of 4 new strings above STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE */
|
||||
TEXID_TO_STRINGID(0x482A, 0x483B, STR_INDUSTRY_VIEW_PRODUCTION_LAST_MONTH_TITLE);
|
||||
/* Same thing for industries */
|
||||
TEXID_TO_STRINGID(0x4802, 0x4826, STR_INDUSTRY_NAME_COAL_MINE);
|
||||
TEXID_TO_STRINGID(0x4827, 0x4829, STR_INDUSTRY_VIEW_REQUIRES_CARGO);
|
||||
TEXID_TO_STRINGID(0x482D, 0x482E, STR_NEWS_INDUSTRY_CONSTRUCTION);
|
||||
TEXID_TO_STRINGID(0x4832, 0x4834, STR_NEWS_INDUSTRY_CLOSURE_GENERAL);
|
||||
TEXID_TO_STRINGID(0x4835, 0x4838, STR_NEWS_INDUSTRY_PRODUCTION_INCREASE_GENERAL);
|
||||
TEXID_TO_STRINGID(0x4839, 0x483A, STR_NEWS_INDUSTRY_PRODUCTION_DECREASE_GENERAL);
|
||||
|
||||
switch (str) {
|
||||
case 0x4830: return STR_ERROR_CAN_T_CONSTRUCT_THIS_INDUSTRY;
|
||||
case 0x4831: return STR_ERROR_FOREST_CAN_ONLY_BE_PLANTED;
|
||||
case 0x483B: return STR_ERROR_CAN_ONLY_BE_POSITIONED;
|
||||
}
|
||||
#undef TEXTID_TO_STRINGID
|
||||
|
||||
if (str == STR_NULL) return STR_EMPTY;
|
||||
|
Loading…
Reference in New Issue
Block a user