Skip to content

Commit 1225e41

Browse files
committed
fix splitstacks toggle in default chests
1 parent 94442e8 commit 1225e41

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compat-chests.lua

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,13 @@ if minetest.get_modpath("default") then
5252
end
5353
local pn = player:get_player_name()
5454
local chest_open = default.chest.open_chests[pn]
55-
if not chest_open then
55+
if not chest_open or not chest_open.pos then
5656
-- chest already closed before formspec
5757
return
5858
end
5959
local pos = chest_open.pos
60-
local chest = pos and minetest.get_node(pos)
61-
local is_pipeworks_chest = chest and pipeworks.chests[chest]
62-
if is_pipeworks_chest and pipeworks.may_configure(pos, player) then
60+
local node = minetest.get_node(pos)
61+
if pipeworks.chests[node.name] and pipeworks.may_configure(pos, player) then
6362
-- Pipeworks Switch
6463
fs_helpers.on_receive_fields(pos, fields)
6564
minetest.show_formspec(pn,

0 commit comments

Comments
 (0)