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:
@ -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
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user