OpenTTD

Tasklist

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

Attached to Project: OpenTTD
Opened by Grzegorz Duczyński (adf88) - Tuesday, 10 March 2015, 16:56 GMT
Last edited by frosch (frosch) - Sunday, 26 April 2015, 09:51 GMT
Type Patch
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

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  FS#6251 
This task depends upon

Closed by  frosch (frosch)
Sunday, 26 April 2015, 09:51 GMT
Reason for closing:  Implemented
Additional comments about closing:  in r27251. Thanks for the patch!
Comment by frosch (frosch) - Wednesday, 18 March 2015, 18:33 GMT
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.
Comment by Grzegorz Duczyński (adf88) - Sunday, 22 March 2015, 12:54 GMT
"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.
Comment by Grzegorz Duczyński (adf88) - Sunday, 22 March 2015, 21:42 GMT
I made another patch that plays with the road stop removal tool. See  FS#6262 

Loading...