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
18
init.lua
18
init.lua
|
@ -46,12 +46,18 @@ climate_mod.settings = {
|
||||||
|
|
||||||
climate_mod.i18n = minetest.get_translator("climate_api")
|
climate_mod.i18n = minetest.get_translator("climate_api")
|
||||||
|
|
||||||
-- warn about clouds being overriden by MTG weather
|
-- attempt to disable MTG weather mod
|
||||||
if climate_mod.settings.skybox and minetest.get_modpath("weather") and minetest.settings:get_bool("enable_weather") then
|
if climate_mod.settings.skybox and minetest.get_modpath("weather") then
|
||||||
minetest.log("warning", "[Regional Weather] " ..
|
if weather ~= nil and weather.get ~= nil then
|
||||||
climate_mod.i18n("Disable MTG weather for the best experience. Check the forum for more information."))
|
weather.get = function(player)
|
||||||
-- try to disable MTG weather. may or may not work depending on load order
|
return {}
|
||||||
minetest.settings:set_bool("enable_weather", false)
|
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
|
end
|
||||||
|
|
||||||
-- initialize empty registers
|
-- initialize empty registers
|
||||||
|
|
2
mod.conf
2
mod.conf
|
@ -2,7 +2,7 @@ name = climate_api
|
||||||
title = Climate API
|
title = Climate API
|
||||||
author = TestificateMods
|
author = TestificateMods
|
||||||
depends = lighting_monoid
|
depends = lighting_monoid
|
||||||
optional_depends = player_monoids, playerphysics, pova
|
optional_depends = player_monoids, playerphysics, pova, weather
|
||||||
description = """
|
description = """
|
||||||
A powerful engine for weather presets and visual effects.
|
A powerful engine for weather presets and visual effects.
|
||||||
Use the regional climate to set up different effects for different regions.
|
Use the regional climate to set up different effects for different regions.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user