]> git.somenet.org - factorio/some-disableenemygeneration.git/commitdiff
comitted control.lua (tree removal) - no functional changes, since the file was alway... master
authorSomeone <someone@somenet.org>
Sat, 30 Nov 2024 23:16:47 +0000 (00:16 +0100)
committerSomeone <someone@somenet.org>
Sat, 30 Nov 2024 23:18:12 +0000 (00:18 +0100)
control.lua [new file with mode: 0644]

diff --git a/control.lua b/control.lua
new file mode 100644 (file)
index 0000000..32cdc8b
--- /dev/null
@@ -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)