From 707fa5a97c0d56e18f16d56f7130ff6220a090a1 Mon Sep 17 00:00:00 2001
From: Sires <ranearodrigo1@gmail.com>
Date: Mon, 26 Aug 2019 19:52:41 +0200
Subject: [PATCH] Fix typos

---
 technic_chests/common.lua |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/technic_chests/common.lua b/technic_chests/common.lua
index 1241c5e..6369b7a 100644
--- a/technic_chests/common.lua
+++ b/technic_chests/common.lua
@@ -1,4 +1,3 @@
-
 technic.chests.groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
 		tubedevice=1, tubedevice_receiver=1}
 technic.chests.groups_noinv = {snappy=2, choppy=2, oddly_breakable_by_hand=2,
@@ -13,8 +12,10 @@
 	can_insert = function(pos, node, stack, direction)
 		local meta = minetest.get_meta(pos)
 		local inv = meta:get_inventory()
-		local onestack = stack:peek_item(1)
-		return inv:room_for_item("main", onestack)
+		if meta:get_int("splitstacks") == 1 then
+			stack = stack:peek_item(1)
+		end
+		return inv:room_for_item("main",stack)
 	end,
 	input_inventory = "main",
 	connect_sides = {left=1, right=1, front=1, back=1, top=1, bottom=1},
@@ -27,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