Add `on_pre_marked_for_deconstruction`, or fire `on_marked_for_deconstruction` before any entity changes

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
curiosity
Filter Inserter
Filter Inserter
Posts: 619
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Add `on_pre_marked_for_deconstruction`, or fire `on_marked_for_deconstruction` before any entity changes

Post by curiosity »

Rseding91 wrote: Thu Feb 06, 2025 11:25 pm I’m not really sure if it was answered but the fluid is pushed out on deconstruction being ordered because pipes are disconnected when marked for deconstruction so fluid doesn’t keep flowing through things to be deconstructed. Once disconnected they can’t push anything anywhere.
Thank you for the explanation. That's also a good reason for the mechanic, as opposed to trying to account for a nebulous situation a player can trivially solve.
Wiwiweb wrote: Thu Feb 06, 2025 11:59 pm That's a great design discussion, but I don't want the heat to get my modding interface request overlooked or deleted 🙃
Hold on, but the fluid doesn't go anywhere, does it? It just get pushed to the neighboring pipes, that's shouldn't be so different from 1.1 from mod PoV. I assume any fluid that didn't fit into the remaining fluid network (if any is left) will stay in the deconstructed entity. If anything, this should fit your use case better.
protocol_1903
Fast Inserter
Fast Inserter
Posts: 212
Joined: Fri Sep 09, 2022 4:33 pm
Contact:

Re: Add `on_pre_marked_for_deconstruction`, or fire `on_marked_for_deconstruction` before any entity changes

Post by protocol_1903 »

Rseding91 wrote: Thu Feb 06, 2025 11:25 pm I’m not really sure if it was answered but the fluid is pushed out on deconstruction being ordered because pipes are disconnected when marked for deconstruction so fluid doesn’t keep flowing through things to be deconstructed. Once disconnected they can’t push anything anywhere.
That makes sense, thanks for the explanation.
curiosity wrote: Fri Feb 07, 2025 4:06 am Hold on, but the fluid doesn't go anywhere, does it? It just get pushed to the neighboring pipes, that's shouldn't be so different from 1.1 from mod PoV. I assume any fluid that didn't fit into the remaining fluid network (if any is left) will stay in the deconstructed entity. If anything, this should fit your use case better.
If it doesn't fit it's just voided. So if you have a tank and a pipe connected, both at 50% capacity, then mark the tank for deconstruction, it would push 50 units into the pipe then delete the rest of it. Although yeah, it really should just stay in that entity/entities.
If you need to reach me, message me on discord.

I make qol mods. Check them out, maybe.
https://mods.factorio.com/user/protocol_1903
If you have a mod idea, I can look into it.
curiosity
Filter Inserter
Filter Inserter
Posts: 619
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Add `on_pre_marked_for_deconstruction`, or fire `on_marked_for_deconstruction` before any entity changes

Post by curiosity »

protocol_1903 wrote: Fri Feb 07, 2025 8:22 pm If it doesn't fit it's just voided. So if you have a tank and a pipe connected, both at 50% capacity, then mark the tank for deconstruction, it would push 50 units into the pipe then delete the rest of it. Although yeah, it really should just stay in that entity/entities.
Then yeah, should be asking for that instead. Seems more likely.
Post Reply

Return to “Modding interface requests”