Updated this patch for my own build. Some things I found problematic and fixed for my version:

Why a distance of 3 instead of 4? In my game the catchment area is 4 so I did get stations not grabbing the name of industries they served.

The standard industry names are still used before the new names.

So if I build next to a Coal mine I first get "New York Mines", then "New York Coal Mine"

That is VERY problematic with NewGRF industries since sometimes their Sand Pit is in fact not a mine. And their Fishing grounds are not an Oil field etc etc, so the default name is often simply wrong. If these new names are used, old default industry names (aside from docks/airport etc) should be ignored.

Also is it just me or are airport names and docks names messed up by this patch. I had to fix something to get those default names working again and not have Airports and Docks named "Wellington South" or "New York Woods"

I dond't really have that single change as a patch file right now but yeah that's basically what I did. I actually removed the clause completely. Since I didn't want the default "Mines" stuff at all anymore. Because it might put in the wrong name with newGRFs, like interpreting something as what it was in the original industry. I don't want that even as the secondary name. But overall it was just changing the if..else stuff yes.

Also yes, the "catchment area" of that naming scheme should be a setting or at least always identical with what the game is using.

Ok I see, I will take a look at doing the changes you made. I think a setting would be simpler, but maybe some code could be used from the "catchment area" patch to make it so that the name is applied if the station you are building covers the industry.

Sorry for resurrecting this, but on current trunk, this does not work anymore; during compilation, the error "station_cmd.cpp:336:20: error: 'SAFEGUARD_DO_NOT_USE_THIS_METHOD' was not declared in this scope" appears, and from my investigation it seems to be related to the use of strcat and strdup (seems they are obsolete now and strecat and stredup are supposed to be used instead). A dirty fix is to remove #include safeguards.h from the file station_cmd.cpp. I was unable to fix it replacing strcat with strecat and strdup with stredup

beginner2 wrote:Sorry for resurrecting this, but on current trunk, this does not work anymore; during compilation, the error "station_cmd.cpp:336:20: error: 'SAFEGUARD_DO_NOT_USE_THIS_METHOD' was not declared in this scope" appears, and from my investigation it seems to be related to the use of strcat and strdup (seems they are obsolete now and strecat and stredup are supposed to be used instead). A dirty fix is to remove #include safeguards.h from the file station_cmd.cpp. I was unable to fix it replacing strcat with strecat and strdup with stredup