mirror of
https://github.com/minetest/minetest_game.git
synced 2025-06-28 12:46:02 +02:00
Always return the leftover ItemStack for on_place and on_rightclick
This commit is contained in:
@ -1612,7 +1612,7 @@ minetest.register_node("default:chest_locked", {
|
||||
" takes " .. stack:get_name() ..
|
||||
" from locked chest at " .. minetest.pos_to_string(pos))
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||
local meta = minetest.get_meta(pos)
|
||||
if has_locked_chest_privilege(meta, clicker) then
|
||||
minetest.show_formspec(
|
||||
@ -1621,6 +1621,7 @@ minetest.register_node("default:chest_locked", {
|
||||
get_locked_chest_formspec(pos)
|
||||
)
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
on_blast = function() end,
|
||||
})
|
||||
|
Reference in New Issue
Block a user