I've seen others make bitmasks for rails specifically but I wanted to be able to have it work for any entity (including ones with secondary bounding boxes with orientation).
I've found that `find_tiles_filtered` doesn't correctly take the orientation still even though `find_entities_filtered` does.
- Version and before image (version 1.1.101) - After `find_entities_filtered`
Code: Select all
/c for _,e in pairs(game.surfaces[1].find_entities_filtered{area={left_top={0.1,-9.9},right_bottom={9.9,19.9},orientation=0.1}}) do e.destroy() end
Code: Select all
/c for _,e in pairs(game.surfaces[1].find_tiles_filtered{area={left_top={0.1,-9.9},right_bottom={9.9,19.9},orientation=0.1}}) do game.surfaces[1].create_entity{ name = "tile-ghost", position = e.position, inner_name = "concrete", force = game.player.force, expires = false } end
I've gotten around this by programming my own version of `find_tiles_filtered` that makes special calls to the builtin after apply the orientation to the bounding box using a rotation matrix but anticipate that it would be much slower than any builtin method.
When BoundingBox Orientation support was added in 1.1.82 was it only for `find_entities_filtered` or meant to be for all functions that used BoundingBox in that way?
106122