From 738506d0c4009763c5bbeee9d2b5edc22027965c Mon Sep 17 00:00:00 2001 From: Thomas Rudin Date: Mon, 28 May 2018 15:19:28 +0200 Subject: [PATCH] conditional set_breath() --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index d9eac30..cc75c4e 100644 --- a/init.lua +++ b/init.lua @@ -81,7 +81,7 @@ minetest.register_globalstep(function(dtime) local has_pants = armor_inv:contains_item("armor", "spacesuit:pants") local has_boots = armor_inv:contains_item("armor", "spacesuit:boots") - if has_helmet and has_chestplate and has_pants and has_boots then + if has_helmet and has_chestplate and has_pants and has_boots and player:get_breath() < 10 then player:set_breath(10) -- TODO: wear end