mirror of
https://github.com/mt-mods/homedecor_modpack.git
synced 2024-12-23 00:20:17 +01:00
fix the medicine cabinet deleting inventory on punch
This commit is contained in:
parent
2cd99d6462
commit
9a13728492
@ -89,8 +89,8 @@ minetest.register_node('homedecor:medicine_cabinet', {
|
||||
groups = { snappy = 3 },
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:medicine_cabinet_open", param2 = fdir })
|
||||
node.name = "homedecor:medicine_cabinet_open"
|
||||
minetest.swap_node(pos, node)
|
||||
end,
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
@ -149,8 +149,8 @@ minetest.register_node("homedecor:medicine_cabinet_open", {
|
||||
},
|
||||
drop = "homedecor:medicine_cabinet",
|
||||
on_punch = function(pos, node, puncher, pointed_thing)
|
||||
local fdir = node.param2
|
||||
minetest.set_node(pos, { name = "homedecor:medicine_cabinet", param2 = fdir })
|
||||
node.name = "homedecor:medicine_cabinet"
|
||||
minetest.swap_node(pos, node)
|
||||
end,
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user