find_entities_filtered: item_name filter
Posted: Sat Oct 08, 2016 3:33 pm
If I want to search the surface for a specific kind of 'item-on-ground' itemEntity, I currently have to manually filter the results of surface.find_entities_filtered() which, as you can imagine, can be a big list of results depending on the area constraints, etc.
( Some background on why I'm trying to do this: viewtopic.php?f=25&t=33935 )
It's going to be much faster if this filtration is done in C.
Would it be possible to get a new additional filter parameter `item_name = "..."` which, if a matching entity is type `item-entity` it will check that <found>.stack.name == item_name
Also: would want same filter available for `count_entities_filtered()`
EDIT: Rather than adding complexity to existing functions, maybe new function specific to getting/counting item entities could be added?
( Some background on why I'm trying to do this: viewtopic.php?f=25&t=33935 )
It's going to be much faster if this filtration is done in C.
Would it be possible to get a new additional filter parameter `item_name = "..."` which, if a matching entity is type `item-entity` it will check that <found>.stack.name == item_name
Also: would want same filter available for `count_entities_filtered()`
EDIT: Rather than adding complexity to existing functions, maybe new function specific to getting/counting item entities could be added?