diff --git a/init.lua b/init.lua index 4cbd76b..099e336 100644 --- a/init.lua +++ b/init.lua @@ -46,12 +46,18 @@ climate_mod.settings = { climate_mod.i18n = minetest.get_translator("climate_api") --- warn about clouds being overriden by MTG weather -if climate_mod.settings.skybox and minetest.get_modpath("weather") and minetest.settings:get_bool("enable_weather") then - minetest.log("warning", "[Regional Weather] " .. - climate_mod.i18n("Disable MTG weather for the best experience. Check the forum for more information.")) - -- try to disable MTG weather. may or may not work depending on load order - minetest.settings:set_bool("enable_weather", false) +-- attempt to disable MTG weather mod +if climate_mod.settings.skybox and minetest.get_modpath("weather") then + if weather ~= nil and weather.get ~= nil then + weather.get = function(player) + return {} + end + elseif minetest.settings:get_bool("enable_weather") then + -- old version with no API support + -- warn about clouds being overriden by MTG weather + minetest.log("warning", "[Regional Weather] " .. + climate_mod.i18n("Disable MTG weather for the best experience. Check the forum for more information.")) + end end -- initialize empty registers diff --git a/mod.conf b/mod.conf index 3231d08..4dbf9f4 100644 --- a/mod.conf +++ b/mod.conf @@ -2,7 +2,7 @@ name = climate_api title = Climate API author = TestificateMods depends = lighting_monoid -optional_depends = player_monoids, playerphysics, pova +optional_depends = player_monoids, playerphysics, pova, weather description = """ A powerful engine for weather presets and visual effects. Use the regional climate to set up different effects for different regions.