diff --git a/3d_armor/README.txt b/3d_armor/README.txt index 7e67f22..02b9141 100644 --- a/3d_armor/README.txt +++ b/3d_armor/README.txt @@ -59,10 +59,6 @@ armor_level_multiplier = 1 -- eg: armor_heal_multiplier = 0 will disable healing altogether. armor_heal_multiplier = 1 --- You can use this to increase or decrease overall armor radiation protection, --- eg: armor_radiation_multiplier = 0 will completely disable radiation protection. -armor_radiation_multiplier = 1 - -- Enable water protection (periodically restores breath when activated) armor_water_protect = true @@ -111,7 +107,7 @@ armor:register_armor("mod_name:speed_boots", { armor_groups = {fleshy=10, radiation=10}, damage_groups = {cracky=3, snappy=3, choppy=3, crumbly=3, level=1}, reciprocate_damage = true, - on_destroy = function(player, item_name) + on_destroy = function(player, stack) local pos = player:getpos() if pos then minetest.sound_play({ @@ -150,7 +146,9 @@ on_destroy = func(player, stack) on_damage = func(player, stack) on_punch = func(player, hitter, time_from_last_punch, tool_capabilities) -Notes: on_punch is called every time the player takes damage, `hitter`, +Notes: + +`on_punch` is called every time a player is punched or takes damage, `hitter`, `time_from_last_punch` and `tool_capabilities` can be `nil` and will be in the case of fall damage, etc. Return `false` to override armor damage effects. When armor is destroyed `stack` will contain a copy of the previous stack. diff --git a/3d_armor/api.lua b/3d_armor/api.lua index 114416a..535735f 100644 --- a/3d_armor/api.lua +++ b/3d_armor/api.lua @@ -58,7 +58,6 @@ armor.config = { destroy = false, level_multiplier = 1, heal_multiplier = 1, - radiation_multiplier = 1, material_wood = true, material_cactus = true, material_steel = true, diff --git a/3d_armor/init.lua b/3d_armor/init.lua index 6ca4ab0..e03babf 100644 --- a/3d_armor/init.lua +++ b/3d_armor/init.lua @@ -295,6 +295,7 @@ minetest.register_on_player_hpchange(function(player, hp_change) local name = player:get_player_name() if name and armor.def[name] then local heal = armor.def[name].heal or 0 + heal = heal * armor.config.heal_multiplier if heal >= math.random(100) then hp_change = 0 end