Last active
October 16, 2022 09:49
-
-
Save justarandomgeek/2c47b4aaee12f717227f867a4c030fae to your computer and use it in GitHub Desktop.
Factorio Command: Remove all trees in 5000 tile radius
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/c | |
pos = game.player.position | |
area = {{pos.x - 5000, pos.y - 5000}, {pos.x + 5000, pos.y + 1.5}} | |
for _, entity in pairs(game.player.surface.find_entities_filtered{area = area, type = "tree"}) do | |
entity.die() | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bless you
edit: this worked better
/c for _, entity in ipairs(game.player.surface.find_entities_filtered{ area={{game.player.position.x-1000, game.player.position.y-1000}, {game.player.position.x+1000, game.player.position.y+1000}}, type="tree"}) do entity.destroy() end