FactorioDeleteDroppedItems

nicolaw 12th January 2020 at 6:25pm
Factorio
/c
for chunk in game.surfaces.nauvis.get_chunks() do
    local top, left = chunk.x * 32, chunk.y * 32
    local bottom, right = top + 32, left + 32
    for _, ent in pairs(game.surfaces.nauvis.find_entities_filtered{area = {{top, left}, {bottom, right}}, name ="item-on-ground"}) do
		if ent.stack then
			ent.stack.clear()
		end
    end
end