(svn r26275) -Fix: If NewGRF provided the same station name for different industry types, stations would end up with same name. So also consider the provided name, not only the industry type.

This commit is contained in:
frosch
2014-01-23 20:23:14 +00:00
parent c910d5bed2
commit 22e86e3d1a

View File

@@ -247,6 +247,14 @@ static StringID GenerateStationName(Station *st, TileIndex tile, StationNaming n
if (s != st && s->town == t) { if (s != st && s->town == t) {
if (s->indtype != IT_INVALID) { if (s->indtype != IT_INVALID) {
indtypes[s->indtype] = true; indtypes[s->indtype] = true;
StringID name = GetIndustrySpec(s->indtype)->station_name;
if (name != STR_UNDEFINED) {
/* Filter for other industrytypes with the same name */
for (IndustryType it = 0; it < NUM_INDUSTRYTYPES; it++) {
const IndustrySpec *indsp = GetIndustrySpec(it);
if (indsp->enabled && indsp->station_name == name) indtypes[it] = true;
}
}
continue; continue;
} }
uint str = M(s->string_id); uint str = M(s->string_id);