From b3fc421e2318ac42a626080374bd59bd01054a83 Mon Sep 17 00:00:00 2001 From: Someone Date: Sun, 1 Dec 2024 00:16:47 +0100 Subject: [PATCH] comitted control.lua (tree removal) - no functional changes, since the file was always budled in the zip. --- control.lua | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 control.lua diff --git a/control.lua b/control.lua new file mode 100644 index 0000000..32cdc8b --- /dev/null +++ b/control.lua @@ -0,0 +1,9 @@ + +-- remove generated trees. +script.on_event(defines.events.on_chunk_generated, function(e) + for key, entity in pairs(e.surface.find_entities(e.area)) do + if entity.type == "tree" then + entity.destroy() + end + end +end) -- 2.43.0