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
This commit is contained in:
tenplus1 2021-01-23 17:51:46 +00:00 committed by GitHub
parent ad7a7139d6
commit 9e06fa33d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View File

@ -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

View File

@ -1,3 +1,4 @@
default?
fire
tnt?
tnt?
3d_armor?

View File

@ -1,3 +1,3 @@
name = fire_plus
depends = fire
optional_depends = default, tnt
optional_depends = default, tnt, 3d_armor