Generalize status effects.
This commit is contained in:
parent
e5005dd8d6
commit
b486af8627
5 changed files with 76 additions and 24 deletions
6
chat.lua
6
chat.lua
|
@ -11,9 +11,9 @@ minetest.register_chatcommand("armor", {
|
|||
minetest.chat_send_player(player_name, " "..group.." "..value)
|
||||
end
|
||||
|
||||
if fun_caves.db.armor_expire and fun_caves.db.armor_expire[player_name] then
|
||||
local armor_time = fun_caves.db.armor_expire[player_name].time
|
||||
local min = math.floor((armor_time - minetest.get_gametime()) / 60)
|
||||
if fun_caves.db.status[player_name].armor_elixir then
|
||||
local armor_time = fun_caves.db.status[player_name].armor_elixir.remove
|
||||
local min = math.floor(math.max(0, armor_time - minetest.get_gametime()) / 60)
|
||||
minetest.chat_send_player(player_name, "Your armor elixir will expire in "..min..' minutes.')
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue