2016-10-23 16:22:50 +02:00
|
|
|
local modpath = minetest.get_modpath("weather_pack");
|
2017-05-22 12:40:16 +02:00
|
|
|
|
|
|
|
-- If skylayer mod not located then embeded version will be loaded.
|
|
|
|
if minetest.get_modpath("skylayer") == nil then
|
2017-06-24 18:15:33 +02:00
|
|
|
dofile(modpath.."/embedded_sky_layer_api.lua")
|
2017-05-22 12:40:16 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- If happy_weather_api mod not located then embeded version will be loaded.
|
|
|
|
if minetest.get_modpath("happy_weather_api") == nil then
|
2017-06-24 18:15:33 +02:00
|
|
|
dofile(modpath.."/embedded_happy_weather_api.lua")
|
|
|
|
dofile(modpath.."/commands.lua")
|
2017-05-22 12:40:16 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Happy Weather utilities
|
|
|
|
dofile(modpath.."/utils.lua")
|
|
|
|
|
|
|
|
dofile(modpath.."/light_rain.lua")
|
2016-10-23 16:22:50 +02:00
|
|
|
dofile(modpath.."/rain.lua")
|
2017-05-22 12:40:16 +02:00
|
|
|
dofile(modpath.."/heavy_rain.lua")
|
|
|
|
dofile(modpath.."/snow.lua")
|
2016-10-23 16:22:50 +02:00
|
|
|
|
|
|
|
if minetest.get_modpath("lightning") ~= nil then
|
2017-06-24 18:15:33 +02:00
|
|
|
dofile(modpath.."/thunder.lua")
|
|
|
|
|
|
|
|
-- Turn off lightning mod 'auto mode'
|
|
|
|
lightning.auto = false
|
2016-10-23 16:22:50 +02:00
|
|
|
end
|
|
|
|
|
2017-05-22 12:40:16 +02:00
|
|
|
dofile(modpath.."/abm.lua")
|
2019-01-19 20:00:36 +01:00
|
|
|
|
|
|
|
minetest.log("action", "[weather_pack] loaded.")
|