mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Fix wrong reported item counts for inventory actions using Shift-Move (#10930)
This commit is contained in:
parent
c12e9cdcba
commit
051e4c2b00
2 changed files with 43 additions and 6 deletions
|
@ -23,6 +23,18 @@ minetest.register_node("chest:chest", {
|
|||
local inv = meta:get_inventory()
|
||||
return inv:is_empty("main")
|
||||
end,
|
||||
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "Allow put: " .. stack:to_string())
|
||||
return stack:get_count()
|
||||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "Allow take: " .. stack:to_string())
|
||||
return stack:get_count()
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "On put: " .. stack:to_string())
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.chat_send_player(player:get_player_name(), "On take: " .. stack:to_string())
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue