mirror of
https://github.com/mt-mods/spacesuit.git
synced 2026-05-04 13:56:51 -06:00
skip drowning if the armor inventory could not be found
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
|
|
||||||
local function check_player(player, timer)
|
local function check_player(player, timer)
|
||||||
local _, armor_inv = armor.get_valid_player(armor, player, "[spacesuit]")
|
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_helmet = armor_inv:contains_item("armor", "spacesuit:helmet")
|
||||||
local has_chestplate = armor_inv:contains_item("armor", "spacesuit:chestplate")
|
local has_chestplate = armor_inv:contains_item("armor", "spacesuit:chestplate")
|
||||||
|
|||||||
Reference in New Issue
Block a user