mirror of
https://github.com/t-affeldt/climate_api.git
synced 2024-11-16 23:50:26 +01:00
Use new API to disable MTG weather
This commit is contained in:
parent
8e3ce58015
commit
8b846b23dc
14
init.lua
14
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
|
||||
-- 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."))
|
||||
-- try to disable MTG weather. may or may not work depending on load order
|
||||
minetest.settings:set_bool("enable_weather", false)
|
||||
end
|
||||
end
|
||||
|
||||
-- initialize empty registers
|
||||
|
|
2
mod.conf
2
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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user