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:
crabman77 2015-08-15 20:39:08 +02:00
parent 5dadd5c2c3
commit b44cff7975
1 changed files with 2 additions and 0 deletions

View File

@ -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)