Something like this, but it does not work
Code: Select all
function clear(player)
for key, entity in pairs(game.surfaces[1].find_entities_filtered({ area={{x = -2500, y = -2500}, {x = 2500, y = 2500}}, name="copper-ore"})) do entity.destroy() end;
end