mirror of
https://github.com/t-affeldt/climate_api.git
synced 2025-07-04 09:20:39 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
c23277284a | |||
5448e04d85 | |||
79233a2cb1 | |||
f3f0eaac2a |
9
init.lua
9
init.lua
@ -44,15 +44,16 @@ climate_mod.settings = {
|
||||
ceiling_checks = get_setting_number("ceiling_checks", 10)
|
||||
}
|
||||
|
||||
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] " ..
|
||||
S("Disable MTG weather for the best experience. Check the forum for more information."))
|
||||
minetest.settings:set_bool("enable_weather", false) -- try to disable MTG weather. may or may not work depending on load order
|
||||
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
|
||||
|
||||
climate_mod.i18n = minetest.get_translator("climate_api")
|
||||
|
||||
-- initialize empty registers
|
||||
climate_mod.weathers = {}
|
||||
climate_mod.effects = {}
|
||||
|
@ -1,3 +1,5 @@
|
||||
local mod_lighting_monoid = minetest.get_modpath("lighting_monoid") ~= nil
|
||||
|
||||
local default_sky = {
|
||||
sky_data = {
|
||||
base_color = nil,
|
||||
@ -74,11 +76,15 @@ local function set_skybox(playername, sky)
|
||||
player:set_moon(sky.moon_data)
|
||||
player:set_sun(sky.sun_data)
|
||||
player:set_stars(sky.star_data)
|
||||
if player.set_lighting then
|
||||
player:set_lighting({
|
||||
shadows = { intensity = sky.light_data.shadow_intensity },
|
||||
saturation = sky.light_data.saturation
|
||||
})
|
||||
local lighting = {
|
||||
shadows = { intensity = sky.light_data.shadow_intensity },
|
||||
saturation = sky.light_data.saturation
|
||||
}
|
||||
if mod_lighting_monoid then
|
||||
lighting_monoid:add_change(player, lighting, "climate_api:merged_lighting")
|
||||
lighting_monoid:del_change(player, "lighting_monoid:base_shadow")
|
||||
elseif player.set_lighting then
|
||||
player:set_lighting(lighting)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# textdomain:climate_api
|
||||
Disable MTG weather for the best experience. Check the forum for more information.=Deaktiviere MTG weather für die beste Spielerfahrung. Mehr Informationen im Forum.
|
||||
Make changes to the current weather=Ändere das aktuelle Wetter
|
||||
Display weather information=Betrachte Informationen zum Wetter
|
||||
The following weather presets are active for you:=Die folgenden Wetterklassen sind gerade aktiv
|
||||
|
@ -1,4 +1,5 @@
|
||||
# textdomain:climate_api
|
||||
Disable MTG weather for the best experience=
|
||||
Make changes to the current weather=
|
||||
Display weather information=
|
||||
The following weather presets are active for you:=
|
||||
|
2
mod.conf
2
mod.conf
@ -1,7 +1,7 @@
|
||||
name = climate_api
|
||||
title = Climate API
|
||||
author = TestificateMods
|
||||
optional_depends = player_monoids, playerphysics, pova
|
||||
optional_depends = player_monoids, playerphysics, pova, lighting_monoid
|
||||
description = """
|
||||
A powerful engine for weather presets and visual effects.
|
||||
Use the regional climate to set up different effects for different regions.
|
||||
|
Reference in New Issue
Block a user