Move surface rail lines closer and add junctions #79481
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Mods "Moves the rail lines used by the railroad mapgen closer and adds junctions"
Purpose of change
The first pass implementation of railroads in #67713 did not include actual junctions in the tiles where multiple tracks met, which made the railroads unable to be navigated by trains. The tracks were also moved further apart compared to the subway system, with no justification I could find.
Describe the solution
The surface railroad had a larger gap between the two train lines than the subway. This made curves tighter, and junctions much harder to build within a single maptile. It also made working on rail vehicles harder, because a vehicle that runs well on the surface might derail underground, or vice versa.
Adapted the straight and curved subway maptiles for use on the surface, copying them from the c++ into json and changing some of ground tiles used.
Modified the 4 way maptile, replacing the half wood & half rail diagonals with full rail.
Modified the 4 way to be a functional 3 way, instead of using the semi functional 3 way from the subway.
Went over the bridge and railroad crossing, and brought them in line with the new rail system.
Describe alternatives you've considered
Leaving the sets of tracks further apart, and attempting to build junctions within the tighter constraints.
Testing
Entered a new world with the railroad mod, checked that everything lined up.
Drove around in a two and six person draisine, as well as an electric train.
The two person draisine worked like a dream, no issues.
The six person draisine & electric train had the odd habit of hopping onto the other track on tight curves, or derailing, but this happened less compared to the previous system. I also found that adding more rail wheels to the six person draisine, and moving the wheels closer together on the electric train, seemed to fix all the issues (which I will work on implementing and testing in another PR).
Additional context