mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2025-01-10 16:37:28 +01:00
Ensure valid inventory table when setting armor
This commit is contained in:
parent
f6502ba32b
commit
fd77253816
@ -205,7 +205,7 @@ armor.set_player_armor = function(self, player)
|
|||||||
change[group] = 1
|
change[group] = 1
|
||||||
levels[group] = 0
|
levels[group] = 0
|
||||||
end
|
end
|
||||||
local list = player_inv:get_list("armor")
|
local list = player_inv:get_list("armor") or {}
|
||||||
for i, stack in pairs(list) do
|
for i, stack in pairs(list) do
|
||||||
if stack:get_count() == 1 then
|
if stack:get_count() == 1 then
|
||||||
local def = stack:get_definition()
|
local def = stack:get_definition()
|
||||||
|
Loading…
Reference in New Issue
Block a user