I think it would be useful to have callbacks for station naming, called on both the station and the closest industry (only if the closest industry is in the catchment area? Possibly all industries in catchment area, closest first?).
The return value would be either the number of a D0xx text, a magic number that maps to one of textIDs 300F..302F, or a magic number that means "revert to default naming".
It might also be useful to have a generic version of this callback, to be called if the station-specific and industry callbacks both fail. The main reason for this is to enable GRF-supplied strings for non rail-stations, but those probably belong in their own feature, so this may not be feasible.
Information that seems useful in this callback includes:
- Number of times this callback has been called, in case there are multiple GRF-supplied names.
- (industries, generic) Which station part is being built
- ΔX/ΔY from the station to the center of the nearest town (signed byte should be sufficient here; if it's more than 127 squares to the nearest town, the scenario creator should be shot.)
- ΔX/ΔY from the station to the nearest industry?
- (station, generic) type of nearest industry?
With this callback, Oz's megastations could name themselves appropriately, eg "\80 Grand Central", and MB's waypoints could name themselves "\80 Waypoint", &c.
The industry version of this callback would be useful for avoiding this type of illogicality:
and for eg naming bouys near fishing grounds to "\80 Fishing Grounds".cornelius wrote:If you build a station next to a brewery it calls it "[town] Mines".