Try to fix mahmutelmas06's reported bug
This commit is contained in:
parent
42da48502e
commit
c9ef53904a
4
init.lua
4
init.lua
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user