mirror of
https://github.com/BlockMen/invtweak.git
synced 2025-01-30 23:40:17 +01:00
fixed, when we place a node in 2 parts(bed) and the 2nd can not be placed invtweak refill while the item is still there.
This commit is contained in:
parent
5dadd5c2c3
commit
b44cff7975
2
init.lua
2
init.lua
@ -191,6 +191,8 @@ end
|
||||
-- tool break sound + autorefill
|
||||
function refill(player, stck_name, index)
|
||||
local inv = player:get_inventory()
|
||||
local old_stack = inv:get_stack("main", index)
|
||||
if old_stack:get_name() == stck_name then return end
|
||||
for i,stack in ipairs(inv:get_list("main")) do
|
||||
if stack:get_name() == stck_name then
|
||||
inv:set_stack("main", index, stack)
|
||||
|
Loading…
Reference in New Issue
Block a user