Skip to content

Instantly share code, notes, and snippets.

@subnomo
Created February 25, 2020 08:10
Show Gist options
  • Save subnomo/315dc441ed3152d1b0f72d7c093c7c66 to your computer and use it in GitHub Desktop.
Save subnomo/315dc441ed3152d1b0f72d7c093c7c66 to your computer and use it in GitHub Desktop.
Factorio script - Deletes all cliffs within 250 units
local surface = game.player.surface
local pp = game.player.position
local count = 0
for key, entity in pairs(surface.find_entities_filtered({ type="cliff", radius=250, position=pp })) do
count = count + 1
entity.destroy()
end
game.player.print(string.format('Destroyed %d cliffs!', count))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment