Try to fix mahmutelmas06's reported bug

This commit is contained in:
Wuzzy 2016-11-12 21:51:32 +01:00
parent 42da48502e
commit c9ef53904a
1 changed files with 55 additions and 51 deletions

View File

@ -59,6 +59,7 @@ minetest.register_on_joinplayer(function(player)
if mod_ui or mod_bags then
inventory_icon.hudids[name].bags = {}
local bags_inv = minetest.get_inventory({type = "detached", name = name.."_bags"})
if bags_inv then
for i=1,4 do
local bag = bags_inv:get_stack("bag"..i, 1)
local scale, text, icon
@ -95,6 +96,7 @@ minetest.register_on_joinplayer(function(player)
})
end
end
end
end)
minetest.register_on_leaveplayer(function(player)
@ -119,6 +121,7 @@ minetest.register_globalstep(function(dtime)
if mod_ui or mod_bags then
local bags_inv = minetest.get_inventory({type = "detached", name = playername.."_bags"})
if bags_inv then
for i=1,4 do
local bag = bags_inv:get_stack("bag"..i, 1)
local scale, text, icon
@ -143,6 +146,7 @@ minetest.register_globalstep(function(dtime)
end
end
end
end
inventory_icon.timer = 0
end
end)