Issue summary:
I'd like to have a way to find only entities marked for deconstruction.
Details:
Currently to find to-be-deconstructed entities we have to find all entities then iterate them to filter the ones marked for deconstruction:
Code: Select all
local entities = surface.find_entities{area=bounds, force=...}
for _, e in pairs(entities) do
if e.to_be_deconstructed() then
...
end
end
Use case:
I'm experimenting with creating a mod that temporarily relocates the player to an alternative (but allied) force along with any entities that have construction requests within the player's roboport range. This effectively allows the player to hit a toggle and make his local roboport service the requests in his immediate vicinity despite possibly the nearby stationary network already trying to service those requests.
Related issues:
This request is very similar to the one already fulfilled here (only, for to-be-deconstructed entities instead of to-be-upgraded ones):
viewtopic.php?p=454093
Thank you for your consideration. Nice game BTW