redruin1/factorio-draftsman

A number of functions are not recursive and will not perform the action on any contained Groups

elswindle opened this issue · 2 comments

This may be an intended functionality and the burden will be on the user to do this, but there are a few functions that do not perform the action on the Group objects inside. The two I noticed are remove_power_connections and entities.remove. These will just perform the function on any EntityLike in the list, but not call the corresponding Group function on its entities.

For remove_power_connections() and remove_circuit_connections(), they now recurse through all subgroups, following their descriptions that they remove ALL power/circuit connections.

entities.remove() is a little less clear-cut; it seems to me that there are valid use cases for having it recurse as well as having it be limited to just the called EntityList. Therefore, I've decided that entities.remove() will remain unchanged, while entities.recursive_remove() will provide this functionality, while being more explicit in both cases as to what exactly is going on. I'll probably follow this naming scheme for other EntityList operations, as appropriate.

Fixed/Added as of version 1.0.0.