Code: Select all
game.get_surface(1).find_entities_filtered{area = {{-10, -10}, {10, 10}}, name= {"rail-signal", "stone-rock", "rail-chain-signal"}}
-- or even like
game.get_surface(1).find_entities_filtered{area = {{-10, -10}, {10, 10}}, filter= {name={"rail-signal", "stone-rock", "rail-chain-signal"}, type={"tree", "rail", "electric-pole"}}}
One could use find_entities() and do the filtering in lua. I don't know though at what point this is faster than using filtered search multiple times (probably depends on the number of names/types to search and the entities found?)