skip drowning if the armor inventory could not be found

This commit is contained in:
BuckarooBanzay
2021-01-03 16:51:57 +01:00
parent 3a7d810546
commit 6d80199412
+4
View File
@@ -1,6 +1,10 @@
local function check_player(player, timer)
local _, armor_inv = armor.get_valid_player(armor, player, "[spacesuit]")
if not armor_inv then
-- inventory not found (somehow?), skip check
return
end
local has_helmet = armor_inv:contains_item("armor", "spacesuit:helmet")
local has_chestplate = armor_inv:contains_item("armor", "spacesuit:chestplate")