1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-07-20 00:20:24 +02:00

[3d_armor] Update to add stand node

This commit is contained in:
LeMagnesium
2016-04-08 22:19:47 +02:00
parent b69f7d33e4
commit 9a649b77f0
19 changed files with 610 additions and 6 deletions

View File

@ -18,12 +18,13 @@ ARMOR_FIRE_PROTECT = false
-- Fire protection nodes, (name, protection level, damage)
ARMOR_FIRE_NODES = {
{"default:lava_source", 5, 4},
{"default:lava_flowing", 5, 4},
{"fire:basic_flame", 3, 4},
{"ethereal:crystal_spike", 2, 1},
{"bakedclay:safe_fire", 2, 1},
{"default:torch", 1, 1},
{"default:lava_source", 5, 4},
{"default:lava_flowing", 5, 4},
{"fire:basic_flame", 3, 4},
{"fire:permanent_flame", 3, 4},
{"ethereal:crystal_spike", 2, 1},
{"ethereal:fire_flower", 2, 1},
{"default:torch", 1, 1},
}
-- Increase this if you get initialization glitches when a player first joins.

View File

@ -592,6 +592,12 @@ end
minetest.register_on_player_hpchange(function(player, hp_change)
local name, player_inv, armor_inv = armor:get_valid_player(player, "[on_hpchange]")
if name and hp_change < 0 then
-- used for insta kill tools/commands like /kill (doesnt damage armor)
if hp_change < -100 then
return hp_change
end
local heal_max = 0
local state = 0
local items = 0
@ -678,3 +684,15 @@ minetest.register_globalstep(function(dtime)
end
armor.timer = 0
end)
-- kill player when command issued
minetest.register_chatcommand("kill", {
params = "<name>",
description = "Kills player instantly",
func = function(name, param)
local player = minetest.get_player_by_name(name)
if player then
player:set_hp(-1001)
end
end,
})

View File

@ -0,0 +1 @@
Adds craftable armor that is visible to other players.