The International Simutrans Forum

 

Author Topic: FIX: All city roads become highways when the timeline is off  (Read 111 times)

0 Members and 1 Guest are viewing this topic.

Offline Ranran

  • Devotee
  • *
  • Posts: 1548
  • Languages: ja
Pull request number #413

(1) At least the city roads should be selected from the list of city roads, so I modified it that way.
Previously, highways were chosen to prioritize durability.

This patch has no effect if you are playing with the timeline turned on.


(2) Magic number 50 is also a city speed limit that comes from the standard, which should be linked to the settings in simconf.tab.
In overcrowded cities like Japan and Asia, large bypass roads run through the city. Their speed limits should depend on the pakset settings.

Offline Freahk

  • Devotee
  • *
  • Posts: 1523
  • Languages: DE, EN
Re: FIX: All city roads become highways when the timeline is off
« Reply #1 on: July 25, 2021, 11:09:14 AM »
Hmm, mentioning "bypass" roads through the city, I guess that feature was discussed very often.
Afaik standard offers guardrail wayobjects to prevent towns from downgrading roads to 50 km/h.
We might offer something like that in extended as well, but we also need a mechanism to stop players from building guardrails everywhere.
Maybe, as such roads do not offer a sidewalk, these shouldn't be accounted for roadconnections of citybuildings?
That means buildings can only spawn adjacent to such a road if it's also adjacent to a road that has a sidewalk and guardrails can only be placed at roads if that wouldn't leave a citybuilding unconnected to a road (with sidewalk) (my most beloved error message btw)

Offline Ranran

  • Devotee
  • *
  • Posts: 1548
  • Languages: ja
Re: FIX: All city roads become highways when the timeline is off
« Reply #2 on: July 25, 2021, 11:21:38 AM »
It has nothing to do with it. I'm sorry, I think I gave a pointless explanation.
I'm talking about the types of roads the city automatically chooses.
It only follows the settings of somuconf.
At least rather than always choosing a highway by durability,
(1) choose from a list of city roads
(2) If there is no city road setting, it is better to select based on the speed of town_road_speed_limit.
Who sets the highway/bypass roads on the list of city roads? I don't think the problem you're assuming can happen unless you intentionally do so.

On the contrary, where does 50 come from?
For example, suppose you have a country with speed limit 45km/h by law, pakset defines town_road_speed_limit=45 in simconf. (By the way, if you do not define this setting, the default value is 50.) This is a long-standing feature. But the game always follows magic number 50???  This is my point.
Such magic numbers should be eliminated.
« Last Edit: July 25, 2021, 11:44:04 AM by Ranran »

Offline Freahk

  • Devotee
  • *
  • Posts: 1523
  • Languages: DE, EN
Re: FIX: All city roads become highways when the timeline is off
« Reply #3 on: July 25, 2021, 12:42:51 PM »
Ah, so missunderstood that second point.
Does that mean town_road_speed_limit in simuconf is ignored?