From 1225e4168bd09b07f1978006640a681e6fc0a4b0 Mon Sep 17 00:00:00 2001 From: OgelGames Date: Wed, 15 May 2024 21:18:26 +1000 Subject: [PATCH] fix splitstacks toggle in default chests --- compat-chests.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/compat-chests.lua b/compat-chests.lua index b996871..5465bfb 100644 --- a/compat-chests.lua +++ b/compat-chests.lua @@ -52,14 +52,13 @@ if minetest.get_modpath("default") then end local pn = player:get_player_name() local chest_open = default.chest.open_chests[pn] - if not chest_open then + if not chest_open or not chest_open.pos then -- chest already closed before formspec return end local pos = chest_open.pos - local chest = pos and minetest.get_node(pos) - local is_pipeworks_chest = chest and pipeworks.chests[chest] - if is_pipeworks_chest and pipeworks.may_configure(pos, player) then + local node = minetest.get_node(pos) + if pipeworks.chests[node.name] and pipeworks.may_configure(pos, player) then -- Pipeworks Switch fs_helpers.on_receive_fields(pos, fields) minetest.show_formspec(pn,