Localize variable and correct /armor calculation.

This commit is contained in:
Duane 2016-06-20 22:40:41 -05:00
parent 3d57691431
commit 2b8b604162
3 changed files with 4 additions and 3 deletions

View file

@ -10,8 +10,9 @@ minetest.register_chatcommand("armor", {
for group, value in pairs(armor) do
minetest.chat_send_player(name, " "..group.." "..value)
end
--print(math.floor(minetest.get_us_time() / (60 * 1000000)))
if fun_caves.armor_expire and fun_caves.armor_expire[name] then
local min = math.floor((fun_caves.armor_expire[name] - minetest.get_us_time()) / 60000000)
local min = math.floor((fun_caves.armor_expire[name] - minetest.get_us_time()) / (60 * 1000000))
minetest.chat_send_player(name, "Your elixir will expire in "..min..' minutes.')
end
end