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
Fix #11528: Don't auto-build past tunnelbridge ends #11606
Conversation
Is it possible to make it continue on the other side of a bridge if you drag over it? |
That's what it does :) Causes a certain amount of weirdness if you drag over different/multiple bridges though... |
Hmm, I dragged over a bridge and it did not continue on the other side. |
This is similar to my PR (draft) from quite a while ago: #9616 One thing to keep in mind is that the "drag and hold ctrl to delete"-behavior will behave different from the "drag to build"-behavior. There are already differences, this will add more differences. Not bad or good per se, but something to consider. |
02fbed5
to
cfc0d9b
Compare
The differences as far as the code is concerned is just a toggle of whether the road/rail is built or deconstructed, so i'm not quite sure what the overall problem with the complexity is there. Though I do agree that as a whole this function is starting to get a bit on the unreadable side |
On the other hand, your PR is much more "complete" in terms of what it achieves. What would you say still needs doing to it to bring it "up to spec" ? |
@LordAro The main thing I struggled with was the visualisation of it. I messed around quite a bit to get the highlighting to look somewhat good, but it always felt like a giant hack. For sure it needs a rebase and a fresh look, the PR is quite old and there's a good change some of the construction logic has changed by now. Unfortunately I have quite limited time available for development ATM... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not be perfect, but it is another step in the right direction.
And yeah, all the scoping, it is a bit annoying. I guess we could take a look at "why", as having the if-condition and if-increment not in the if is a bit weird. But, not for this PR!
This reverts commit 59f6c19.
This reverts commit 59f6c19.
This reverts commit 59f6c19.
This reverts commit 59f6c19.
Motivation / Problem
#11528 - autodragging over existing rail/road would start under a bridge, which is not expected behaviour
Description
Keep track of whether we're under a tunnel or bridge when dragging and toggle as appropriate.
Limitations
Feels very "just increase complexity" and there's probably additional edge cases that aren't covered, or are created, by this change.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.