fix splitstacks toggle in default chests
This commit is contained in:
parent
94442e87bb
commit
1225e4168b
@ -52,14 +52,13 @@ if minetest.get_modpath("default") then
|
|||||||
end
|
end
|
||||||
local pn = player:get_player_name()
|
local pn = player:get_player_name()
|
||||||
local chest_open = default.chest.open_chests[pn]
|
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
|
-- chest already closed before formspec
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local pos = chest_open.pos
|
local pos = chest_open.pos
|
||||||
local chest = pos and minetest.get_node(pos)
|
local node = minetest.get_node(pos)
|
||||||
local is_pipeworks_chest = chest and pipeworks.chests[chest]
|
if pipeworks.chests[node.name] and pipeworks.may_configure(pos, player) then
|
||||||
if is_pipeworks_chest and pipeworks.may_configure(pos, player) then
|
|
||||||
-- Pipeworks Switch
|
-- Pipeworks Switch
|
||||||
fs_helpers.on_receive_fields(pos, fields)
|
fs_helpers.on_receive_fields(pos, fields)
|
||||||
minetest.show_formspec(pn,
|
minetest.show_formspec(pn,
|
||||||
|
Loading…
Reference in New Issue
Block a user