When in a pakset with way_height_clearance=1 (i.e ways are 1 tile high), it is not possible to build tunnels on empty space 2 tiles above a sloped tunnel. This patch fixes this. Tested for both one- and two-tile deep slopes in tunnels (road/train in pak64).
Diagram: in a pakset where ways are 1 tile high, tunnels can not be built on tile A because it is an empty space 2 tiles above tile B, which is a slope. The patch makes the waybuilder recognise and ignore this specific situation. (If the slope in B were two tiles high, normal behaviour applies.)
___ ___ ___ A . .
___ ___ ___ . . .
\
. . . B\ ___ ___
(The waybuilder looks for tiles below the tunnel because there might be a sloped tunnel there, to which the new tunnel would have to connect. But in this case, there is no reason to connect to the slope it found since it does not reach high enough, so the waybuilder should ignore it and keep going straight.)
Could you add a test for this (probably in test_way_tunnel.nut)?
If I did everything correctly, this patch should add the test. I tried to run all tests with pak64 but some tests failed (e.g monorail depot).
THe tests only run if the main language is English.
Incorporated in r11743, thanks. However, I have removed the check that checks that building a tunnel across the top half of a double sloped tunnel fails; this check failed which seems to be a different but related bug.