1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2025-07-20 06:10:23 +02:00

Always return the ItemStack for on_rightclick to comply with the API.

This commit is contained in:
Tim
2016-07-31 01:17:23 +02:00
parent b33428b907
commit 337dc05e70
19 changed files with 78 additions and 40 deletions

View File

@ -79,10 +79,11 @@ for i in ipairs(bedcolors) do
after_dig_node = function(pos)
homedecor.unextend_bed(pos, color)
end,
on_rightclick = function(pos, node, clicker)
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if minetest.get_modpath("beds") then
beds.on_rightclick(pos, clicker)
else return end
end
return itemstack
end
})
@ -104,10 +105,11 @@ for i in ipairs(bedcolors) do
after_dig_node = function(pos)
homedecor.unextend_bed(pos, color)
end,
on_rightclick = function(pos, node, clicker)
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if minetest.get_modpath("beds") then
beds.on_rightclick(pos, clicker)
else return end
end
return itemstack
end,
drop = "homedecor:bed_"..color.."_regular"
})
@ -137,10 +139,11 @@ for i in ipairs(bedcolors) do
inv:add_item("main", "homedecor:bed_"..color.."_regular 2")
end
end,
on_rightclick = function(pos, node, clicker)
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
if minetest.get_modpath("beds") then
beds.on_rightclick(pos, clicker)
else return end
end
return itemstack
end
})