Expire elixirs on death option.
This commit is contained in:
parent
48847cc7e0
commit
f438090899
4 changed files with 15 additions and 0 deletions
10
elixir.lua
10
elixir.lua
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue