Expire elixirs on death option.

This commit is contained in:
Duane 2016-06-22 08:24:30 -05:00
parent 48847cc7e0
commit f438090899
4 changed files with 15 additions and 0 deletions

View file

@ -1,5 +1,15 @@
fun_caves.armor_expire = {}
if fun_caves.expire_elixir_on_death then
minetest.register_on_dieplayer(function(player)
local name = player:get_player_name()
if fun_caves.armor_expire[name] then
player:set_armor_groups({fleshy = 100})
fun_caves.armor_expire[name] = nil
end
end)
end
local function armor(user, factor)
local player_name = user:get_player_name()
local armor = user:get_armor_groups()