summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/station_cmd.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 6ef602b83..c253679d9 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -247,6 +247,14 @@ static StringID GenerateStationName(Station *st, TileIndex tile, StationNaming n
if (s != st && s->town == t) {
if (s->indtype != IT_INVALID) {
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;
}
uint str = M(s->string_id);