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

Impossible/invalid orders aren't marked as such in the order list #7972

Open
James103 opened this issue Feb 4, 2020 · 2 comments
Open

Impossible/invalid orders aren't marked as such in the order list #7972

James103 opened this issue Feb 4, 2020 · 2 comments

Comments

@James103
Copy link
Contributor

@James103 James103 commented Feb 4, 2020

Version of OpenTTD

d7a928a
(Based on #5213, meaning that it was also broken in 1.2.1)

Expected result

If you clone a vehicle whose orders are impossible to make (e.g. a bus going to a truck-only station), the orders will be copied into the new vehicle. Attempting to share/unshare order lists with impossible orders works normally.

Actual result

If you clone a vehicle whose orders are impossible to make (e.g. a bus going to a truck-only station), the orders will not be copied into the new vehicle and no error message is displayed. Attempting to share/unshare order lists with impossible orders fails.

Steps to reproduce

  1. Buy a new bus.
  2. Build a bus station and name it "A".
  3. Build another station that has both a bus and truck component, and name it "B".
  4. Order the bus to go to both stations.
  5. Demolish any bus stops with truck stops attached, leaving only the truck stops.
  6. Look at the order list. The order "Go to B" is not marked as invalid.
  7. Attempt to copy the vehicle. None of the orders are copied and no warning is shown.
  8. Attempt to copy the vehicle with order sharing. This works normally, at first.
  9. Attempt to share or unshare the impossible orderlist. This will fail.
@LordAro
Copy link
Member

@LordAro LordAro commented Feb 9, 2020

I think the actual issue here is that the invalid orders (bus to truck stop) are not properly marked as such in the order list. (e.g. like when the station is removed entirely)

It's perfectly reasonable to not copy invalid orders (when not sharing), and it mostly makes sense that the invalid order is copied when sharing.

You can't unshare the list as that would create an invalid order, which isn't allowed. You can delete the invalid order (which should be displayed as such), and then you can successfully unshare.

@James103 James103 changed the title Impossible orders silently fail to be copied and have their sharing settings fully protected. Impossible/invalid orders aren't marked as such in the order list Jun 2, 2020
@James103
Copy link
Contributor Author

@James103 James103 commented Jun 2, 2020

Edited title and description to expose the actual issue more (it still occurs in 1.10.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.