1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2024-09-25 14:10:18 +02:00

Re-add Torch Damage

This re-adds torch damage of 1 per second if fire protection is enabled.
This commit is contained in:
tenplus1 2023-02-03 18:16:28 +00:00 committed by GitHub
parent 567a9df0da
commit 3afe32bc02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -478,6 +478,13 @@ minetest.register_globalstep(function(dtime)
end)
if armor.config.fire_protect == true then
-- make torches hurt
minetest.override_item("default:torch", {damage_per_second = 1})
minetest.override_item("default:torch_wall", {damage_per_second = 1})
minetest.override_item("default:torch_ceiling", {damage_per_second = 1})
-- check player damage for any hot nodes we may be protected against
minetest.register_on_player_hpchange(function(player, hp_change, reason)
if reason.type == "node_damage" and reason.node then