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

Remove road stops with underlying roads if CTRL is pressed (similarly to rail stations) #6252

Closed
DorpsGek opened this issue Mar 10, 2015 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

adf88 opened the ticket and wrote:

When removing rail stations with the station removal tool we can press CTRL to remove underlying tracks too. This patch does similar thing when removing drive-through road stops - if CTRL is pressed underlying roads will be removed too.

See also #6251

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/6252
@DorpsGek
Copy link
Member Author

frosch wrote:

The patch does not check road_owner and tram_owner. It then allows to remove road/tram of other companies.

A second issue that could be improved is the inter-dependency with RemoveRoadStop: Currently RemoveRoadStop allows removing drive-through road-stops in case of DC_BANKRUPT even if there is a vehicle on the tile, assuming that CmdRemoveRoadStop will keep the road. While DC_BANKRUPT does not "press ctrl", it's kind of magic.


This comment was imported from FlySpray: https://bugs.openttd.org/task/6252#comment13826

@DorpsGek
Copy link
Member Author

adf88 wrote:

"The patch does not check road_owner and tram_owner. It then allows to remove road/tram of other companies."
Damn, so obvious... Corrected.

"A second issue..."
Yes. You're right. In this case (DC_BANKRUPT+"ctrl pressed") presence of a vehicle could be checked theoretically. However, bankrupting company is not supposed to remove any roads. I decided to fail right away, during command argument validation.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/6252#comment13832

@DorpsGek
Copy link
Member Author

adf88 wrote:

I made another patch that plays with the road stop removal tool. See #6262


This comment was imported from FlySpray: https://bugs.openttd.org/task/6252#comment13833

@DorpsGek
Copy link
Member Author

frosch closed the ticket.

Reason for closing: Implemented

in r27251. Thanks for the patch!


This comment was imported from FlySpray: https://bugs.openttd.org/task/6252

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant