Entity.order_deconstruction mark only

Things that we aren't going to implement
rtssmkn
Inserter
Inserter
Posts: 20
Joined: Sun May 22, 2016 10:36 am
Contact:

Entity.order_deconstruction mark only

Post by rtssmkn »

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).
Rseding91
Factorio Staff
Factorio Staff
Posts: 14343
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Entity.order_deconstruction mark only

Post by Rseding91 »

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.
If you want to get ahold of me I'm almost always on Discord.
rtssmkn
Inserter
Inserter
Posts: 20
Joined: Sun May 22, 2016 10:36 am
Contact:

Re: Entity.order_deconstruction mark only

Post by rtssmkn »

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.
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.
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...
Rseding91
Factorio Staff
Factorio Staff
Posts: 14343
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Entity.order_deconstruction mark only

Post by Rseding91 »

rtssmkn wrote:
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.
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.
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...
Yep, just like how logistics robots don't do construction. They each have their purpose.
If you want to get ahold of me I'm almost always on Discord.
rtssmkn
Inserter
Inserter
Posts: 20
Joined: Sun May 22, 2016 10:36 am
Contact:

Re: Entity.order_deconstruction mark only

Post by rtssmkn »

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.
Post Reply

Return to “Won't implement”