mirror of
https://github.com/t-affeldt/regional_weather.git
synced 2024-11-18 08:20:32 +01:00
Tweak weather conditions
This commit is contained in:
parent
5b3ddf895c
commit
c43e972e83
@ -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)
|
||||
|
@ -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 = {}
|
||||
|
@ -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 = {}
|
||||
|
@ -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 = {}
|
||||
|
@ -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 = {}
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user