move weatherdef to top

This commit is contained in:
cora 2021-09-28 03:10:28 +02:00
parent cff2d445f7
commit 37a9d268ab
1 changed files with 9 additions and 9 deletions

View File

@ -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"
}
})