mirror of
https://github.com/minetest-mods/time_regulation.git
synced 2024-12-23 01:00:35 +01:00
parent
e9787b55aa
commit
5faec7598f
13
init.lua
13
init.lua
@ -3,12 +3,12 @@
|
||||
-- By Mg/LeMagnesium
|
||||
-- License: WTFPL
|
||||
-- Last modification :
|
||||
-- 05/12/16 @ 12:20PM GMT+1 (Mg)
|
||||
-- 05/16/16 @ 02:14PM GMT+1 (Mg)
|
||||
--
|
||||
|
||||
-- Namespace first, with basic informations
|
||||
time_reg = {}
|
||||
time_reg.version = "00.01.24"
|
||||
time_reg.version = "00.01.25"
|
||||
time_reg.authors = {"Mg/LeMagnesium"}
|
||||
|
||||
-- Definitions
|
||||
@ -367,6 +367,15 @@ function time_reg.init()
|
||||
time_reg.log("\tNight: " .. 1440 / time_reg.night_time_speed .. " minutes")
|
||||
end
|
||||
|
||||
-- Shutdown
|
||||
-- Sometimes MT will shutdown and write current time_speed in minetest.conf; we need to change the value back to normal before it happens
|
||||
function time_reg.on_shutdown()
|
||||
minetest.setting_set("time_speed", time_reg.time_speed)
|
||||
time_reg.log("Time speed set back to " .. time_reg.time_speed)
|
||||
end
|
||||
|
||||
minetest.register_on_shutdown(time_reg.on_shutdown)
|
||||
|
||||
-- --[[ NOW WE SHALL START ]]-- --
|
||||
|
||||
time_reg.log("Thank you for using TimeRegulation v" .. time_reg.version .. " by " .. table.concat(time_reg.authors, ", "))
|
||||
|
Loading…
Reference in New Issue
Block a user