Don't complain that you cannot remove rail/road if it doesn't exist. #9034
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.
Motivation / Problem
Currently, when you place a 10-piece length of rail on an existing 9-piece length of rail, you don't get an error, even though you told it to re-build 9 pieces of rail. If you do the opposite (9 pieces of rail over an existing 10-piece length of rail), you get an error. This is somewhat inconsistent, not to mention quite a nuisance while building.
Description
For both the creation and removal of rail and road pieces, we no longer complain when the requested change is already done. This makes building a bit more idempotent, and hopefully a little bit less frustrating.
Limitations
I'm not 100% how this affects AI scripts. Some AIscript guru might know more about this.
I also purposefully did not touch any of the water functions, as that is a can of worms I'm not confident in opening.
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.