mirror of
https://repo.or.cz/minetest_orienteering.git
synced 2024-12-04 21:03:49 +01:00
Use builtin algorithm to calculate hours + minutes
This commit is contained in:
parent
da93f8bc5f
commit
9188542a7f
4
init.lua
4
init.lua
@ -308,8 +308,8 @@ function orienteering.update_hud_displays(player)
|
||||
local time = minetest.get_timeofday()
|
||||
if watch or gps or quadcorder then
|
||||
local totalminutes = time * 1440
|
||||
local hours = math.floor(totalminutes / 60)
|
||||
local minutes = math.floor(math.fmod(totalminutes, 60))
|
||||
local minutes = totalminutes % 60
|
||||
local hours = math.floor((totalminutes - minutes) / 60)
|
||||
local twelve = orienteering.playerhuds[name].twelve
|
||||
if twelve then
|
||||
local ampm
|
||||
|
Loading…
Reference in New Issue
Block a user