mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-24 17:50:37 +01:00
parent
0faa14e2d5
commit
e74f3f4aa6
@ -68,13 +68,11 @@ end
|
||||
|
||||
-- override hot nodes so they do not hurt player anywhere but mod
|
||||
if ARMOR_FIRE_PROTECT == true then
|
||||
minetest.after(2, function()
|
||||
for _, row in ipairs(ARMOR_FIRE_NODES) do
|
||||
if minetest.registered_nodes[row[1]] then
|
||||
minetest.override_item(row[1], {damage_per_second = 0})
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local time = 0
|
||||
@ -90,7 +88,7 @@ armor = {
|
||||
.."list[current_player;craftpreview;7,2;1,1;]",
|
||||
textures = {},
|
||||
default_skin = "character",
|
||||
version = "0.4.3",
|
||||
version = "0.4.4",
|
||||
}
|
||||
|
||||
if minetest.get_modpath("inventory_plus") then
|
||||
@ -254,13 +252,13 @@ armor.set_player_armor = function(self, player)
|
||||
self:update_player_visuals(player)
|
||||
end
|
||||
|
||||
armor.update_armor = function(self, player, dtime)
|
||||
armor.update_armor = function(self, player)
|
||||
local name, player_inv, armor_inv, pos = armor:get_valid_player(player, "[update_armor]")
|
||||
if not name then
|
||||
return
|
||||
end
|
||||
local hp = player:get_hp() or 0
|
||||
if ARMOR_FIRE_PROTECT == true and dtime then
|
||||
if ARMOR_FIRE_PROTECT == true then
|
||||
pos.y = pos.y + 1.4 -- head level
|
||||
local node_head = minetest.get_node(pos).name
|
||||
pos.y = pos.y - 1.2 -- feet level
|
||||
@ -270,7 +268,7 @@ armor.update_armor = function(self, player, dtime)
|
||||
-- check for fire protection, if not enough then get hurt
|
||||
if row[1] == node_head or row[1] == node_feet then
|
||||
if hp > 0 and armor.def[name].fire < row[2] then
|
||||
hp = hp - row[3] * dtime
|
||||
hp = hp - row[3] * ARMOR_UPDATE_TIME
|
||||
player:set_hp(hp)
|
||||
break
|
||||
end
|
||||
@ -634,7 +632,7 @@ minetest.register_globalstep(function(dtime)
|
||||
time = time + dtime
|
||||
if time > ARMOR_UPDATE_TIME then
|
||||
for _,player in ipairs(minetest.get_connected_players()) do
|
||||
armor:update_armor(player, time)
|
||||
armor:update_armor(player)
|
||||
end
|
||||
time = 0
|
||||
end
|
||||
|
@ -1,3 +1,6 @@
|
||||
default
|
||||
inventory_plus?
|
||||
unified_inventory?
|
||||
fire?
|
||||
ethereal?
|
||||
bakedclay?
|
||||
|
@ -251,3 +251,4 @@ for k, v in pairs(ARMOR_MATERIALS) do
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
|
@ -33,10 +33,18 @@ depends: 3d_armor
|
||||
Makes hand wielded items visible to other players.
|
||||
|
||||
[mod] Shields [shields]
|
||||
-------------------------------------
|
||||
-----------------------
|
||||
|
||||
depends: 3d_armor
|
||||
|
||||
Originally a part of 3d_armor, shields have been re-included as an optional extra.
|
||||
If you do not want shields then simply remove the shields folder from the modpack.
|
||||
|
||||
[mod] Technic Armor [technic_armor]
|
||||
-----------------------------------
|
||||
|
||||
depends: 3d_armor
|
||||
|
||||
Adds tin, silver and technic materials to 3d_armor.
|
||||
Requires technic mod to be installed for craft registration.
|
||||
|
||||
|
@ -132,3 +132,4 @@ end
|
||||
minetest.after(0, function()
|
||||
table.insert(armor.elements, "shield")
|
||||
end)
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
[mod] Technic Armor [technic_armor]
|
||||
===================================
|
||||
|
||||
Adds tin, silver and technic materials to 3d_armor.
|
||||
Requires technic mod to be installed for craft registration.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user