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: removing long roads doesn't prioritize refusal of local authority over other errors #9831
Conversation
…y over other errors
@@ -1113,8 +1113,14 @@ std::tuple<CommandCost, Money> CmdRemoveLongRoad(DoCommandFlag flags, TileIndex | |||
cost.AddCost(ret); | |||
had_success = true; | |||
} else { | |||
/* Ownership errors are more important. */ | |||
if (last_error.GetErrorMessage() != STR_ERROR_OWNED_BY) last_error = ret; | |||
/* Some errors are more equal than others. */ |
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.
/* Some errors are more equal than others. */ | |
/* Some errors are more important than others. */ |
The word "important" describes it better than "equal".
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.
No. Humor is important!
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.
PS: I can be bought off with cookies (or beer) to give me another opinion. Just saying ;)
…y over other errors (OpenTTD#9831)
…y over other errors (OpenTTD#9831)
…y over other errors (OpenTTD#9831)
Fixes #9820
Motivation / Problem
Some errors are more equal than others. Ownership errors already were. Now local authority errors are too. See #9820 for example.
Description
See patch. Can't explain it in more words.
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.