mirror of https://github.com/OpenTTD/OpenTTD
(svn r24523) -Fix: The gender of an industry name is defined by the industry-type part of the name, not by the town-name part, even if it comes first.
parent
c7a536a6d8
commit
bd17361817
|
@ -1313,11 +1313,18 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg
|
||||||
const Industry *i = Industry::GetIfValid(args->GetInt32(SCC_INDUSTRY_NAME));
|
const Industry *i = Industry::GetIfValid(args->GetInt32(SCC_INDUSTRY_NAME));
|
||||||
if (i == NULL) break;
|
if (i == NULL) break;
|
||||||
|
|
||||||
/* First print the town name and the industry type name. */
|
if (_scan_for_gender_data) {
|
||||||
int64 args_array[2] = {i->town->index, GetIndustrySpec(i->type)->name};
|
/* Gender is defined by the industry type.
|
||||||
StringParameters tmp_params(args_array);
|
* STR_FORMAT_INDUSTRY_NAME may have the town first, so it would result in the gender of the town name */
|
||||||
|
StringParameters tmp_params(NULL, 0, NULL);
|
||||||
|
buff = FormatString(buff, GetStringPtr(GetIndustrySpec(i->type)->name), &tmp_params, last, next_substr_case_index);
|
||||||
|
} else {
|
||||||
|
/* First print the town name and the industry type name. */
|
||||||
|
int64 args_array[2] = {i->town->index, GetIndustrySpec(i->type)->name};
|
||||||
|
StringParameters tmp_params(args_array);
|
||||||
|
|
||||||
buff = FormatString(buff, GetStringPtr(STR_FORMAT_INDUSTRY_NAME), &tmp_params, last, next_substr_case_index);
|
buff = FormatString(buff, GetStringPtr(STR_FORMAT_INDUSTRY_NAME), &tmp_params, last, next_substr_case_index);
|
||||||
|
}
|
||||||
next_substr_case_index = 0;
|
next_substr_case_index = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue