Page 1 of 1

[0.17.52] [Minor] Deconstruction Planner: in Editor mode, using DP on trains on rails will leave behind curved rails

Posted: Wed Jun 26, 2019 1:37 pm
by TheBloke
Platform tested on: macOS 10.14.5 (Mojave)
Version tested: 0.17.52

Using a Deconstruction Planner in Editor mode (instant deconstruction = on) on a train + rails:

A DP used in Editor mode on trains-on-rails will remove both the train and straight rails (unlike in normal game mode), but it will leave behind curved rails in any place where those curved rails had a loco or wagon on them:

Before DP:
Image

After DP:
Image

Expected result: All rails are removed.

Re: [0.17.52] [Minor] Deconstruction Planner: in Editor mode, using DP on trains on rails will leave behind curved rails

Posted: Wed Jun 26, 2019 6:11 pm
by Rseding91
Thanks for the report however this isn't a bug. Rails under trains can't be deconstructed so the instant deconstruction doesn't ever fire for them. If that changes here viewtopic.php?f=7&t=72579 then this will also react accordingly.

Re: [0.17.52] [Minor] Deconstruction Planner: in Editor mode, using DP on trains on rails will leave behind curved rails

Posted: Wed Jun 26, 2019 8:01 pm
by TheBloke
OK thanks for the details. But I was wondering why the different behaviour for curved rails versus straight? It does work as I expected for straight rails - they are removed at the same time as the train in Editor mode - just not for curved ones?

Are they handled differently internally?

Re: [0.17.52] [Minor] Deconstruction Planner: in Editor mode, using DP on trains on rails will leave behind curved rails

Posted: Thu Jul 04, 2019 5:37 pm
by knightelite
He answered it when I filed the same bug a while ago: viewtopic.php?f=23&t=70100

The editor apparently behaves that way due to how it iterates over entities to be removed (basically curved rails are checked before trains are removed so they stay, straight rails are checked after trains are removed so they're also removed). I still think it should be made consistent though, and he did say he's adding it to a to-do list.

Re: [0.17.52] [Minor] Deconstruction Planner: in Editor mode, using DP on trains on rails will leave behind curved rails

Posted: Thu Jul 04, 2019 7:03 pm
by TheBloke
knightelite wrote:
Thu Jul 04, 2019 5:37 pm
He answered it when I filed the same bug a while ago: viewtopic.php?f=23&t=70100

The editor apparently behaves that way due to how it iterates over entities to be removed (basically curved rails are checked before trains are removed so they stay, straight rails are checked after trains are removed so they're also removed). I still think it should be made consistent though, and he did say he's adding it to a to-do list.
Ah thanks for the explanation and link.

The good news is that it's not an issue any more - thanks to him fixing the other issue I raised, regarding rails with trains on them not being removed by DPs in the normal game, Editor now removes both trains and rails instantly :)

Thanks again RSeding!

Re: [0.17.52] [Minor] Deconstruction Planner: in Editor mode, using DP on trains on rails will leave behind curved rails

Posted: Wed Jul 10, 2019 1:11 pm
by knightelite
Awesome.