Skip to content
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

[Bug]: Destroying road when local authority doesn't allow it gives the wrong error message #9820

Closed
DonaldDuck313 opened this issue Feb 19, 2022 · 4 comments · Fixed by #9831

Comments

@DonaldDuck313
Copy link

Version of OpenTTD

12.1, Windows 11

Expected result

When I try to delete a road but the local authority doesn't allow it, I should get an error message saying "Local authority doesn't allow this", no matter what button I use.

Actual result

When I try to delete a road using the button but the local authority doesn't allow it, I get an error message saying "there is no road". If I use the button instead, it gives the correct error message.

Steps to reproduce

  1. Make the local authority of a town mad at you by destroying buildings, trees, etc.
  2. Try to destroy a road owned by that town by using the button.
  3. You will get an error message saying "there is no road", see video below.
OpenTTD.12.1.2022-02-19.12-57-23_Trim.mp4
@glx22
Copy link
Contributor

glx22 commented Feb 20, 2022

I think it shows "there is no road" because there is no road on the last tile of your selection.

@2TallTyler
Copy link
Member

I think it shows "there is no road" because there is no road on the last tile of your selection.

I can confirm this. I get the proper error when I only try to remove road tiles.

OpenTTD 12 1 3_10_2022 2_31_18 PM

@2TallTyler
Copy link
Member

Related: #9034

@TrueBrain
Copy link
Member

Been throwing coins all day what to do with this ticket.

Basically, in the use-case presented there are two errors over the full stretch:

  • No road to remove
  • Not allowed to remove the road

So the toss-up becomes: which of these two errors should be presented to the user. Currently it is what-ever the most northern tile throws. Very tempted to always make "not allowed" win from any other error .. which is already the case for ownership.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants