Filtered deconstruction
Filtered deconstruction
I have a filtered deconstruction planner. What command can I use to apply that filter to an area?
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Filtered deconstruction
Without actually selecting an area?
From a quick look at the doc it looks like you'd have to do it manually. I.e. read filters from stack, find_entities_filtered, deconstruct one-by-one.
From a quick look at the doc it looks like you'd have to do it manually. I.e. read filters from stack, find_entities_filtered, deconstruct one-by-one.
Re: Filtered deconstruction
Closest solution will be an API requirest on surface.deconstruct_area{area=…, force=…, player=…} to allow passing entity/tile filters and settings (which can be retrieved from an item stack)
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Filtered deconstruction
The documentation on LuaSurface.deconstruct_area has no mention whatsoever of any filtering capability at all.Nexela wrote:Closest solution will be an API requirest on surface.deconstruct_area{area=…, force=…, player=…} to allow passing entity/tile filters and settings (which can be retrieved from an item stack)
Re: Filtered deconstruction
Like I said an API request
Re: Filtered deconstruction
I suppose you could also hook on_marked_for_deconstruction, deconstruct the whole area and cancel_deconstruction() for anything that fails the filters.