mirror of
				https://github.com/mt-mods/homedecor_modpack.git
				synced 2025-11-04 11:15:32 +01:00 
			
		
		
		
	fix the medicine cabinet deleting inventory on punch
This commit is contained in:
		@@ -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,
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user