init.lua 1.07 KB
Newer Older
1
local modpath = minetest.get_modpath("weather_pack");
2 3 4

-- If skylayer mod not located then embeded version will be loaded.
if minetest.get_modpath("skylayer") == nil then
5
	dofile(modpath.."/lib_sky_layer_api.lua")
6 7 8 9
end

-- If happy_weather_api mod not located then embeded version will be loaded.
if minetest.get_modpath("happy_weather_api") == nil then
10
	dofile(modpath.."/lib_happy_weather_api.lua")
Artūras's avatar
Artūras committed
11
	dofile(modpath.."/commands.lua")
12 13
end

14 15 16 17 18 19
legacy_MT_version = false
if minetest.get_humidity == nil then
	minetest.log("warning", "MOD [weather_pack]: Old Minetest version detected, some mod features will not work.")
	legacy_MT_version = true
end

20 21 22
-- Happy Weather utilities
dofile(modpath.."/utils.lua")

23 24 25 26 27
dofile(modpath.."/weathers/light_rain.lua")
dofile(modpath.."/weathers/rain.lua")
dofile(modpath.."/weathers/heavy_rain.lua")
dofile(modpath.."/weathers/snow.lua")
dofile(modpath.."/weathers/snowstorm.lua")
28 29

if minetest.get_modpath("lightning") ~= nil then
30
	dofile(modpath.."/weathers/thunder.lua")
Artūras's avatar
Artūras committed
31 32 33

	-- Turn off lightning mod 'auto mode'
	lightning.auto = false
34 35
end

36
dofile(modpath.."/abm.lua")