mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-26 06:13:45 +01:00
Ammendment to 21b5c685051d5681de7a526ed7b30992556878b5
This commit is contained in:
parent
21b5c68505
commit
e4b12558d4
@ -482,6 +482,7 @@ armor.save_armor_inventory = function(self, player)
|
||||
return
|
||||
end
|
||||
local elements = {}
|
||||
local player_inv = player:get_inventory()
|
||||
for i = 1, 6 do
|
||||
local stack = inv:get_stack("armor", i)
|
||||
local element = self:get_element(stack:get_name())
|
||||
@ -489,7 +490,6 @@ armor.save_armor_inventory = function(self, player)
|
||||
elements[element] = true;
|
||||
else
|
||||
inv:remove_item("armor", stack)
|
||||
local player_inv = player:get_inventory()
|
||||
if player_inv and player_inv:room_for_item("main", stack) then
|
||||
player_inv:add_item("main", stack)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user