A mod that I was debugging was trying to check if the armor inventory was empty with:
Code: Select all
player_inv:is_empty("armor")
It turns out that the player's armor inventory is a detached inventory. It can be accessed with:
Code: Select all
local player_name = player:get_player_name()
local player_armor_inv = minetest.get_inventory({type="detached", name=player_name.."_armor"})