mirror of
https://github.com/mt-mods/pipeworks.git
synced 2024-12-26 10:50:27 +01:00
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
|
||||
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,
|
||||
|
Loading…
Reference in New Issue
Block a user