From dfcf64c1d07f4006045af37b0b01dbfc82dbb1d1 Mon Sep 17 00:00:00 2001
From: SmallJoker <mk939@ymail.com>
Date: Sat, 26 Aug 2023 10:57:05 +0200
Subject: [PATCH] Chainsaw: new setting to disable safe cutting

---
 technic_chests/common.lua |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/technic_chests/common.lua b/technic_chests/common.lua
index 9a5bc7a..87ace1a 100644
--- a/technic_chests/common.lua
+++ b/technic_chests/common.lua
@@ -1,7 +1,7 @@
 technic.chests.groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
-		tubedevice=1, tubedevice_receiver=1}
+		tubedevice=1, tubedevice_receiver=1, technic_chest=1}
 technic.chests.groups_noinv = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
-		tubedevice=1, tubedevice_receiver=1, not_in_creative_inventory=1}
+		tubedevice=1, tubedevice_receiver=1, not_in_creative_inventory=1, technic_chest=1}
 
 technic.chests.tube = {
 	insert_object = function(pos, node, stack, direction)
@@ -28,7 +28,9 @@
 end
 
 local function inv_change(pos, count, player)
-	if not default.can_interact_with_node(player, pos) then
+	-- Skip check for pipeworks (fake player)
+	if minetest.is_player(player) and
+			not default.can_interact_with_node(player, pos) then
 		return 0
 	end
 	return count

--
Gitblit v1.8.0