mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2024-08-20 13:24:10 +02:00
Use ItemStack:set_count()
This commit is contained in:
parent
f974fd8c2c
commit
88a740c840
@ -39,9 +39,8 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_put = function(inv, listname, index, stack, player)
|
on_put = function(inv, listname, index, stack, player)
|
||||||
local stacktable = stack:to_table()
|
stack:set_count(stack:get_stack_max())
|
||||||
stacktable.count = stack:get_stack_max()
|
inv:set_stack(listname, index, stack)
|
||||||
inv:set_stack(listname, index, ItemStack(stacktable))
|
|
||||||
minetest.sound_play("electricity", {to_player=player_name, gain = 1.0})
|
minetest.sound_play("electricity", {to_player=player_name, gain = 1.0})
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user