Localize variable and correct /armor calculation.
This commit is contained in:
parent
3d57691431
commit
2b8b604162
3 changed files with 4 additions and 3 deletions
3
chat.lua
3
chat.lua
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue