Torch Damage Switchable (#29)

Turn torch fire damage off if fire damage/protection enabled
Minor fixes to README.MD after further testing.
This commit is contained in:
Sirrobzeroone 2020-12-13 23:07:39 +11:00 committed by GitHub
parent 3b97763fdc
commit 291f0eb23a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 5 deletions

View File

@ -29,7 +29,7 @@
**Recommends:** sfinv, unified_inventory or smart_inventory (use only one to avoid conflicts)
**Supports:** player_monoids and armor_monoid
**Supports:** player_monoids, armor_monoid and POVA
Adds craftable armor that is visible to other players. Each armor item worn contributes to
a player's armor group level making them less vulnerable to weapons.
@ -104,8 +104,14 @@ Override the following default settings by adding them to your ***minetest.conf*
**defaults to true if using ethereal mod**
armor_fire_protect = false
### Fire protection enabled, disable torch fire damage
**when fire protection is enabled allows you to disable fire damage from torches**
**defaults to true if using ethereal mod**
### Enable punch damage effects.
armor_fire_protect_torch = false
### Enable punch damage effects
armor_punch_damage = true
@ -322,11 +328,11 @@ The below Diamond chestplate has a 12% chance to completely block all damage (ar
### Physics
The physics attributes supported by 3d_armor are ***physics_jump, physics_speed and physics_gravity***. Although 3d_armor supports the use of this with no other mods it is recommended that the mod [player_monoids](https://forum.minetest.net/viewtopic.php?t=14895) is used to help with intermod compatability.
***physics_jump*** - Will increase/decrease the jump strength of the player so they can jump more/less. Done as a fractional so "physics_jump=1.5" will increase jump strength by 50%.
***physics_jump*** - Will increase/decrease the jump strength of the player so they can jump more/less. The base number is "1" and any value is added or subtracted, supports fractional so "physics_jump=1" will increase jump strength by 100%. "physics_jump= -0.5" will decrease jump by 50%.
***physics_speed*** - Will increase/decrease the walk speed of the player so they walk faster/slower. Done as a fractional so "physics_speed=1.5" will increase speed by 50%.
***physics_speed*** - Will increase/decrease the walk speed of the player so they walk faster/slower. The base number is "1" and any value is added or subtracted, supports fractional so "physics_speed=1.5" will increase speed by 150%, "physics_speed= -0.5" will decrease speed by 50%.
***physics_gravity*** - Will increase/decrease gravity the player experiences so it's higher/lower. Done as a fractional so "physics_gravity=1.5" will increase gravity by 50%.
***physics_gravity*** - Will increase/decrease gravity the player experiences so it's higher/lower. The base number is "1" and any value is added or subtracted, supports fractional so "physics_gravity=2" will increase gravity by 200%, "physics_gravity= -1" will decrease gravity by 100%.
*Note: The player physics modifications won't be applied via `set_physics_override` if `player_physics_locked` is set to 1 in the respective player's meta.*

View File

@ -97,6 +97,7 @@ armor.config = {
material_crystal = true,
water_protect = true,
fire_protect = minetest.get_modpath("ethereal") ~= nil,
fire_protect_torch = minetest.get_modpath("ethereal") ~= nil,
punch_damage = true,
}

View File

@ -62,6 +62,17 @@ for material, _ in pairs(armor.materials) do
end
end
-- Remove torch damage if fire_protect_torch == false
if armor.config.fire_protect_torch == false and armor.config.fire_protect == true then
for k,v in pairs(armor.fire_nodes) do
for k2,v2 in pairs(v) do
if string.find (v2,"torch") then
armor.fire_nodes[k] = nil
end
end
end
end
-- Mod Compatibility
if minetest.get_modpath("technic") then

View File

@ -44,6 +44,9 @@ armor_water_protect (Enable water protection) bool true
# Enable fire protection (defaults true if using ethereal mod).
armor_fire_protect (Enable fire protection) bool false
# Enable fire damage from torches (defaults true if using ethereal mod).
armor_fire_protect_torch (Enable fire protection torch damage) bool false
# Enable punch damage effects.
armor_punch_damage (Enable damage effects) bool true