forked from VoxeLibre/VoxeLibre
consider 'time_speed' change at runtine
This commit is contained in:
parent
f1c01e2785
commit
252c7c501e
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("mcl_furnaces")
|
local S = minetest.get_translator("mcl_furnaces")
|
||||||
local time_multiplier = 24*60*60 / (minetest.settings:get('time_speed') or 72)
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Formspecs
|
-- Formspecs
|
||||||
|
@ -164,6 +163,7 @@ local function furnace_node_timer(pos, elapsed)
|
||||||
local src_item = meta:get_string("src_item") or ""
|
local src_item = meta:get_string("src_item") or ""
|
||||||
local fuel_totaltime = meta:get_float("fuel_totaltime") or 0
|
local fuel_totaltime = meta:get_float("fuel_totaltime") or 0
|
||||||
|
|
||||||
|
local time_multiplier = 86400 / (minetest.settings:get('time_speed') or 72)
|
||||||
local current_game_time = .0 + ((minetest.get_day_count() + minetest.get_timeofday()) * time_multiplier)
|
local current_game_time = .0 + ((minetest.get_day_count() + minetest.get_timeofday()) * time_multiplier)
|
||||||
|
|
||||||
local last_game_time = meta:get_string("last_gametime") -- FIXME: In Windows s(g)et_float() works OK but under Linux it returns rounded 2-byte values like 449540.000000000 which are unusable
|
local last_game_time = meta:get_string("last_gametime") -- FIXME: In Windows s(g)et_float() works OK but under Linux it returns rounded 2-byte values like 449540.000000000 which are unusable
|
||||||
|
|
Loading…
Reference in New Issue