diff --git a/ca_effects/lightning.lua b/ca_effects/lightning.lua index ef9ecc5..d5bb479 100644 --- a/ca_effects/lightning.lua +++ b/ca_effects/lightning.lua @@ -3,6 +3,8 @@ if not minetest.get_modpath("lightning") then return end local LIGHTNING_CHANCE = 10 lightning.auto = false +local rng = PcgRandom(82492402425) + local function handle_effect(player_data) for playername, data in pairs(player_data) do local player = minetest.get_player_by_name(playername) diff --git a/ca_weathers/rain.lua b/ca_weathers/rain.lua index c253d0b..aa31c42 100644 --- a/ca_weathers/rain.lua +++ b/ca_weathers/rain.lua @@ -4,8 +4,8 @@ local conditions = { min_height = regional_weather.settings.min_height, max_height = regional_weather.settings.max_height, min_heat = 30, - min_humidity = 40, - max_humidity = 60 + min_humidity = 50, + max_humidity = 65 } local effects = {} diff --git a/ca_weathers/rain_heavy.lua b/ca_weathers/rain_heavy.lua index 6b79074..a1c9327 100644 --- a/ca_weathers/rain_heavy.lua +++ b/ca_weathers/rain_heavy.lua @@ -3,8 +3,8 @@ local name = "regional_weather:rain_heavy" local conditions = { min_height = regional_weather.settings.min_height, max_height = regional_weather.settings.max_height, - min_heat = 30, - min_humidity = 60 + min_heat = 40, + min_humidity = 65 } local effects = {} diff --git a/ca_weathers/snow.lua b/ca_weathers/snow.lua index 38fba16..219a8be 100644 --- a/ca_weathers/snow.lua +++ b/ca_weathers/snow.lua @@ -4,8 +4,8 @@ local conditions = { min_height = regional_weather.settings.min_height, max_height = regional_weather.settings.max_height, max_heat = 40, - min_humidity = 40, - max_humidity = 55 + min_humidity = 50, + max_humidity = 65 } local effects = {} diff --git a/ca_weathers/snow_heavy.lua b/ca_weathers/snow_heavy.lua index 3fbe686..afc6a2a 100644 --- a/ca_weathers/snow_heavy.lua +++ b/ca_weathers/snow_heavy.lua @@ -3,8 +3,8 @@ local name = "regional_weather:snow_heavy" local conditions = { min_height = regional_weather.settings.min_height, max_height = regional_weather.settings.max_height, - max_heat = 40, - min_humidity = 55 + max_heat = 30, + min_humidity = 65 } local effects = {} diff --git a/ca_weathers/wind.lua b/ca_weathers/wind.lua index 88c978d..08f503b 100644 --- a/ca_weathers/wind.lua +++ b/ca_weathers/wind.lua @@ -9,12 +9,12 @@ local function generate_effects(params) override["climate_api:skybox"] = { clouds_data = { - speed = params.state.wind * CLOUD_SPEED_MULTIPLICATOR + speed = params.wind * CLOUD_SPEED_MULTIPLICATOR } } local movement_direction = vector.normalize(params.player:get_player_velocity()) - local vector_product = vector.dot(movement_direction, params.state.wind) + local vector_product = vector.dot(movement_direction, params.wind) local movement_penalty = climate_api.utility.logistic_growth(vector_product, 1.6, 0.15, 0.8) + 0.1 override["regional_weather:speed_buff"] = movement_penalty