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:
parent
ad7a7139d6
commit
9e06fa33d3
7
api.lua
7
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
|
-- Replace min/max table with random value from min to max
|
||||||
local function get_val(val)
|
local function get_val(val)
|
||||||
if type(val) == "table" then
|
if type(val) == "table" then
|
||||||
@ -24,6 +26,11 @@ function fire_plus.burn_player(player, burns, damage, not_initial)
|
|||||||
|
|
||||||
name = player:get_player_name()
|
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
|
-- Fire was extinguished
|
||||||
if not fire_plus.burning[name] and not_initial then
|
if not fire_plus.burning[name] and not_initial then
|
||||||
return
|
return
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
default?
|
default?
|
||||||
fire
|
fire
|
||||||
tnt?
|
tnt?
|
||||||
|
3d_armor?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user