For an upcoming mod of mine which speeds up chest/container deconstruction by also utilizing available logistic bots instead of only construction bots,
it would be nice to be able to only mark an entity for deconstruction, so that it can no longer be fast replaced by the user and its deconstruction must
be cancelled prior to interacting with the entity again.
In the mod's case, I fast replace the existing chest/container by one that has logistic_mode = "active_provider", effectfully calling available logistic bots
to clear out the inventory, unless of course, I call order_deconstruction(...) upon it.
The rationale behind this is, that when I order deconstruction of an entity, only construction bots will be ordered to clear out the chests/containers
inventory. Marking it for deconstruction would not do such thing, it would instead decorate the entity with the "deconstruction decal" and make it
behave as any other entity currently under deconstruction. Yet, no construction robots will be called and the entity behaves just like normal.
I can then also use the deconstruction planner to remove the deconstruction mark, causing the on_canceled_deconstruction event to fire.
So, I would propose a change to the Entity's api, namely Entity.mark_for_deconstruction(force).
Entity.order_deconstruction mark only
Re: Entity.order_deconstruction mark only
The game doesn't support this concept in any way and adding it in just for mods to use wouldn't be worth the code bloat it would add.
Additionally you can speed up chest/container deconstruction by building more robots.
Additionally you can speed up chest/container deconstruction by building more robots.
If you want to get ahold of me I'm almost always on Discord.
Re: Entity.order_deconstruction mark only
Hm, I do not know your code, but I figure that splitting it up so that upon mark_for_deconstruction would simply leave out the internal signal to the construction bots for deconstructing the entity.Rseding91 wrote:The game doesn't support this concept in any way and adding it in just for mods to use wouldn't be worth the code bloat it would add.
Additionally you can speed up chest/container deconstruction by building more robots.
In my perfect world, this would be an additional internal parameter to the function/method that realizes the deconstruction...
As for more robots: I have here 2000 construction bots. And 46000 logistic bots. I would need to build an additional 44000 construction bots, while 42000 logistic bots idle around...
Re: Entity.order_deconstruction mark only
Yep, just like how logistics robots don't do construction. They each have their purpose.rtssmkn wrote:Hm, I do not know your code, but I figure that splitting it up so that upon mark_for_deconstruction would simply leave out the internal signal to the construction bots for deconstructing the entity.Rseding91 wrote:The game doesn't support this concept in any way and adding it in just for mods to use wouldn't be worth the code bloat it would add.
Additionally you can speed up chest/container deconstruction by building more robots.
In my perfect world, this would be an additional internal parameter to the function/method that realizes the deconstruction...
As for more robots: I have here 2000 construction bots. And 46000 logistic bots. I would need to build an additional 44000 construction bots, while 42000 logistic bots idle around...
If you want to get ahold of me I'm almost always on Discord.
Re: Entity.order_deconstruction mark only
I will make this a feature request then, considering that construction bots will build but not fill chests based on their filters. Likewise so, and upon deconstruction, logistic bots should be responsible for clearing out the chests, if available, otherwise, construction bots should fill in.
Feel free to move this to the appropriate topic, or, alternatively, use a proper issue tracker.
Feel free to move this to the appropriate topic, or, alternatively, use a proper issue tracker.