News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Changed stop generation to use streetnames before naming scheme

Started by cousjath, March 08, 2026, 10:38:01 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

cousjath

This changes behaviour to match Standard. Extended behaviour before the PR generates stops like Affcot mezzo stop, Affcot axis stop, Affcot east stop, Affcot village south stop etc. This changes to the streetlist instead, which especially when combined with regions gives a greater variety to stop names.

PR is at https://github.com/jamespetts/simutrans-extended/pull/678

Matthew

I have never fetched a PR as fast as this one!

OK, that's mainly because I was already on the forum for other reasons, but I am also very bored with the default stop names, especially since some of the magic ones (north/south/east/west) rarely if ever appear, so I end up with every town having X Bridge (even if there isn't a bridge), X Green (even if there isn't any green), etc.

I think it's a matter of preference, rather than right or wrong, but I prefer this patch's behaviour.

BTW there are also changes to the indenting on dozens of other lines in simhalt.cc as well. Was this intentional or was it some kind of IDE feature or linter? It means 'Git Blame' and tools that depend upon on it show this commit as having made the last changes to these lines, which seems suboptimal. I often use such tools to try to search for information here about parts of the code that I don't understand.

(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

cousjath

The changes to lots of indentation was unintentional, I told eclipse to reset indentation when a I moved the code, but did it for the whole file instead of just that bit. I've redone the commit with just those lines changed.

jamespetts

Hello - thank you very much for your contribution and apologies for not having had time to respond earlier: I have been preoccupied with other matters lately. It is always very good to see new contributions.

The behaviour of using general names first is intentional as it matches reality. The first (or only) railway station in a town is not called "Bigtown Pied Pigeon Street". It's just called "Bigtown". The second station is similarly likely to have a generic name ("Bigtown Central", "Bigtown Road", etc.). Only when the town has lots of different stops and stations do people start having to be more creative with the names (typically using the names of the roads or other nearby features). 

If there were to be a feature like this, it would have to be optional (and off by default). An optional feature would need to write a save state, so the file format would need to be updated. This would need to be verified to work without loss of synchronisation in network mode and be fully compatible with the 15.x branch. I suspect, however, that it may not be worth this effort.

Thank you again for your contribution, however - people taking the time and effort to contribute code is always welcome.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.