Try to disable MTG weather, reconfigure global cycle length, reformatting

This commit is contained in:
Till Affeldt 2023-02-23 04:33:17 +01:00
parent 4d0b080dd5
commit bf2d4e09ca
2 changed files with 26 additions and 19 deletions

View File

@ -25,25 +25,32 @@ end
-- load settings from config file -- load settings from config file
climate_mod.settings = { climate_mod.settings = {
damage = get_setting_bool("damage", true), damage = get_setting_bool("damage", true),
raycast = get_setting_bool("raycast", true), raycast = get_setting_bool("raycast", true),
particles = get_setting_bool("particles", true), particles = get_setting_bool("particles", true),
skybox = get_setting_bool("skybox", true), skybox = get_setting_bool("skybox", true),
sound = get_setting_bool("sound", true), sound = get_setting_bool("sound", true),
hud_overlay = get_setting_bool("hud_overlay", true), hud_overlay = get_setting_bool("hud_overlay", true),
wind = get_setting_bool("wind", true), wind = get_setting_bool("wind", true),
seasons = get_setting_bool("seasons", true), seasons = get_setting_bool("seasons", true),
fahrenheit = get_setting_bool("fahrenheit", false), fahrenheit = get_setting_bool("fahrenheit", false),
block_updates = get_setting_bool("block_updates", true), block_updates = get_setting_bool("block_updates", true),
heat = get_setting_number("heat_base", 0), heat = get_setting_number("heat_base", 0),
humidity = get_setting_number("humidity_base", 0), humidity = get_setting_number("humidity_base", 0),
time_spread = get_setting_number("time_spread", 1), time_spread = get_setting_number("time_spread", 1),
particle_count = get_setting_number("particle_count", 1), particle_count = get_setting_number("particle_count", 1),
tick_speed = get_setting_number("tick_speed", 1), tick_speed = get_setting_number("tick_speed", 1),
volume = get_setting_number("volume", 1), volume = get_setting_number("volume", 1),
ceiling_checks = get_setting_number("ceiling_checks", 10), ceiling_checks = get_setting_number("ceiling_checks", 10)
} }
-- 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
end
climate_mod.i18n = minetest.get_translator("climate_api") climate_mod.i18n = minetest.get_translator("climate_api")
-- initialize empty registers -- initialize empty registers

View File

@ -1,5 +1,5 @@
local GSCYCLE = 0.3 * climate_mod.settings.tick_speed -- only process event loop after this amount of time local GSCYCLE = 0.06 * climate_mod.settings.tick_speed -- only process event loop after this amount of time
local WORLD_CYCLE = 30.00 * climate_mod.settings.tick_speed -- only update global environment influences after this amount of time local WORLD_CYCLE = 30.00 * climate_mod.settings.tick_speed -- only update global environment influences after this amount of time
local gs_timer = 0 local gs_timer = 0
local world_timer = 0 local world_timer = 0