From 2e91017b16232ded0c9d70a5da34aa1c7349b6c8 Mon Sep 17 00:00:00 2001 From: oof2win2 Date: Sun, 19 Sep 2021 12:19:43 +0000 Subject: [PATCH] :bug: Fix tree decon toggle not working --- modules/addons/tree-decon.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/addons/tree-decon.lua b/modules/addons/tree-decon.lua index 075d0dfb..95a34396 100644 --- a/modules/addons/tree-decon.lua +++ b/modules/addons/tree-decon.lua @@ -58,6 +58,10 @@ Event.add(defines.events.on_marked_for_deconstruction, function(event) -- Allowed to decon this entity, but not fast if allow ~= 'fast' then return end + + local player = game.get_player(index) + if not HasEnabledDecon:get(player) then return end + -- Allowed fast decon on this entity, just trees local head = tree_queue._head + 1 if not last_user and entity.type ~= 'cliff' then