[0.17.34] Deconstruction planner does not remove curved rails with trains on them in editor mode

Bugs that are actually features.
Post Reply
knightelite
Fast Inserter
Fast Inserter
Posts: 132
Joined: Fri Oct 05, 2018 3:49 pm
Contact:

[0.17.34] Deconstruction planner does not remove curved rails with trains on them in editor mode

Post by knightelite »

What did I do?

Used a deconstruction planner from editor mode to remove rails with trains on them.

What happened?

All trains were removed, all straight rails were removed, curved rails with no trains on top were removed, but curved rails without trains on them were not removed.

What did I expect to have happen?

I expected all rails to be removed. In regular mode (non editor) trains + rails with no trains are marked for deconstruction, while in editor it should be everything removed.

Gif demonstrating the problem. I've attached the save used in this demo as well.
Attachments
factorio-previous.log
(8.64 KiB) Downloaded 66 times
factorio-current.log
(6.87 KiB) Downloaded 64 times
0.17_rail_decon_planner_fail.zip
(2.06 MiB) Downloaded 62 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.17.34] Deconstruction planner does not remove curved rails with trains on them in editor mode

Post by Rseding91 »

Thanks for the report. There's actually no special logic in editor mode around removing trains on rails. You just happen to be in a setup where when iterating the entities to be marked for deconstruction the trains are found first and destroyed via the editor "destroy on marked for deconstruction" logic. In the curved rail example the train isn't the first thing found and so it finds the curved rail first, fails to remove it because it has a train on it, and then moves on.

I've got a large collection of things that I want to work on for the editor mode at some point so I'll add this to it. For now, this isn't technically a bug - just behavior you thought would work one way but actually doesn't do anything special.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”