-
-
Notifications
You must be signed in to change notification settings - Fork 975
Feature: Railways can be created "through" bridges, tunnels, stations… #9616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Kuhnovic
wants to merge
1
commit into
OpenTTD:master
Choose a base branch
from
Kuhnovic:railway_creation_through_bridges
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9de12b1
to
540fb35
Compare
540fb35
to
d189fee
Compare
d189fee
to
6b1ff29
Compare
6b1ff29
to
7be940a
Compare
7be940a
to
2a4cbe2
Compare
2a4cbe2
to
afc33ea
Compare
afc33ea
to
4688c15
Compare
4688c15
to
d87d1d8
Compare
d87d1d8
to
034c7cd
Compare
034c7cd
to
8bda363
Compare
…stations, and can start in depot tiles
8bda363
to
2ade9cb
Compare
#11089 accomplishes some of this in a cleaner way, but I'd still be interested in seeing the "drag through" feature finished someday. 😃 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
…. And starting from depot tiles.
Motivation / Problem
When laying track using the AutoRail tool, I often find myself accidentally starting on a bridge, tunnel or station tile. This invalidates the entire action and no rail is built. The other way around, i.e. starting at an empty tile and ending on say a station tile, that works just fine. This can be quite annoying for example when you are trying to create lots of bridges / tunnels in a crowded map.
Description
My changes allow the user to start the AutoRail tool on train station tiles, train depot tiles, bridgehead tiles and tunnel entrance tiles. The user must drag in the right direction, or can be 45 degrees off.
In addition, the user can drag "through" a tunnel, bridge or station. This obviously doesn't apply to depots. If there are multiple tunnels or a tunnel + bridge above each other, we would follow the route that a train would take when driving along the dragged line. In other words, we simply enter the first tunnel or bridge, and exit out of the other end.
[EDIT] This now only applies when one is creating new track. When deleting track, basically we just "delete whatever we can". This approach is more in line with how we currently do things (before my changes).
Here's an impression of what all of this looks like:
[EDIT] And now also for roads/trams:

Limitations
I like the visualization, but I need to jump through a number of hoops to get there. Worst case I can ditch the new visualization.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.