News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Tunnel Improvements

Started by PJMack, March 26, 2022, 10:56:19 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PJMack

I pushed an update to the PR which, as requested, uses the find_route algorithm to find the nearest ventilation point (any place below land).  When building a tunnel with a length limit, there must be a path to a ventilation point using tunnels with an equal or greater limit.  This is to prevent, say, a tube tunnel turning into a channel tunnel partway out to sea.  The ventilation path is not restricted to the path of tunnel ways, so the ventilation can cross between parallel tunnels as in the channel tunnels.  I know I said this before, but this should conclude the coding section of this PR.

For the pak128.Britain-Ex specific items to be resolved, that discussion should probably continue here

PJMack

In the aforementioned discussion for pak128.Britain-Ex, it currently appears that most most rail vehicles in that pakset would need to be set to half height.

The question becomes then, should rail vehicles be tall or short by default?  Having rail vehicles be short by default would be greatly beneficial in the design of pak128.Britain-Ex (e.g. not needing to change 800+ dat files), however doing so would have the potential of messing with the balance of the other paksets which may require the other pakset designers needing to change hundreds of dat files. 



Also, as per request from the pak128.Britain-Ex discussion, I updated the PR to make it possible to specify "is_tall=1" for electrification wires which would prevent them from being built under low bridges or tunnels (or low bridges being built on them).

jamespetts

Apologies for not having had the chance to look into this in more detail until now. I am afraid that I am having trouble in getting the prohibition for tunnel construction under buildings to work. The tooltip shows that this is prohibited, but I am able to build as follows without any hindrance:



Note that these buildings are not next to an existing subsurface tunnel built under a road.
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.

PJMack

I fixed the issue.

The problem was only with single click tunnel building, which uses different way-building code than for  tunnel building in (sliced) underground view.

jamespetts

Quote from: PJMack on May 30, 2022, 07:48:16 PMI fixed the issue.

The problem was only with single click tunnel building, which uses different way-building code than for  tunnel building in (sliced) underground view.
Thank you for this. I have been doing some further testing. One problem that I seem to be having is that the sub-building cost appears not to be registering in the game. I should be grateful if you could look into this. Thank you.
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.

PJMack

Quote from: jamespetts on May 31, 2022, 12:00:02 AMOne problem that I seem to be having is that the sub-building cost appears not to be registering in the game. I should be grateful if you could look into this
I pushed a fix.  It turned out to be a typo in the dat file.



I also pushed a fix for an issue with half height tracks and elevated ways as I had overlooked some places where the list of permissible half height waytypes were hard-coded into the if statements while refactoring those into a function call.

jamespetts

Excellent, thank you for that. This appears to work.

I have now incorporated this patch - thank you very much for your work on this; it is quite the improvement.
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.