From 37a9d268abe7df9212aec40402b32cf42b084146 Mon Sep 17 00:00:00 2001 From: cora Date: Tue, 28 Sep 2021 03:10:28 +0200 Subject: [PATCH] move weatherdef to top --- mods/ENVIRONMENT/mcl_weather/init.lua | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mods/ENVIRONMENT/mcl_weather/init.lua b/mods/ENVIRONMENT/mcl_weather/init.lua index 76f7d94f..aab03ad8 100644 --- a/mods/ENVIRONMENT/mcl_weather/init.lua +++ b/mods/ENVIRONMENT/mcl_weather/init.lua @@ -18,10 +18,19 @@ players.weatheractive = {} players.weather = {} local interval=1 +local weathercycle_active=false function mcl_weather.register_weather(name,def) mcl_weather.registered_weathers[name] = def end +mcl_weather.register_weather("none",{ + min_duration = mcl_weather.min_duration, + max_duration = mcl_weather.max_duration, + transitions = { + [50] = "rain", + [100] = "snow" + } +}) local modpath=minetest.get_modpath(minetest.get_current_modname()) dofile(modpath.."/skycolor.lua") dofile(modpath.."/snow.lua") @@ -373,13 +382,4 @@ minetest.register_chatcommand("toggledownfall", { return mcl_weather.change(new[r],true) end end -}) - -mcl_weather.register_weather("none",{ - min_duration = mcl_weather.min_duration, - max_duration = mcl_weather.max_duration, - transitions = { - [50] = "rain", - [100] = "snow" - } }) \ No newline at end of file