From 9e06fa33d38c58b09b8765b79fdcdffa5f2291f2 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Sat, 23 Jan 2021 17:51:46 +0000 Subject: [PATCH] Add 3d_armor fire protection support * support for 3d_armor fire protection Adds support for 3d_armor fire protection. * Update depends.txt * Update mod.conf --- api.lua | 7 +++++++ depends.txt | 3 ++- mod.conf | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/api.lua b/api.lua index 593b8cb..013dae3 100644 --- a/api.lua +++ b/api.lua @@ -1,3 +1,5 @@ +local armor_mod = minetest.get_modpath("3d_armor") + -- Replace min/max table with random value from min to max local function get_val(val) if type(val) == "table" then @@ -24,6 +26,11 @@ function fire_plus.burn_player(player, burns, damage, not_initial) name = player:get_player_name() + -- 3d_armor fire protection puts out flames + if armor_mod and armor.def[name].fire > 1 then + fire_plus.extinguish_player(name) + end + -- Fire was extinguished if not fire_plus.burning[name] and not_initial then return diff --git a/depends.txt b/depends.txt index 9766c7f..9bed040 100644 --- a/depends.txt +++ b/depends.txt @@ -1,3 +1,4 @@ default? fire -tnt? \ No newline at end of file +tnt? +3d_armor? diff --git a/mod.conf b/mod.conf index fcf0315..de39dfa 100644 --- a/mod.conf +++ b/mod.conf @@ -1,3 +1,3 @@ name = fire_plus depends = fire -optional_depends = default, tnt +optional_depends = default, tnt, 3d_armor