mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-07 06:06:10 -04:00
Always return the leftover ItemStack for on_place and on_rightclick
This commit is contained in:
parent
e38099225c
commit
71c7e21669
6 changed files with 20 additions and 15 deletions
|
@ -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,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue