mirror of
https://github.com/t-affeldt/regional_weather.git
synced 2025-07-23 10:50:23 +02:00
Add additional constraints
This commit is contained in:
@ -21,7 +21,7 @@ local function generate_effects(params)
|
||||
local override = {}
|
||||
|
||||
local cloud_density = climate_api.utility.rangelim(params.humidity / 100, 0.15, 0.65)
|
||||
local cloud_thickness = climate_api.utility.rangelim(params.base_humidity * 0.2, 1, 18)
|
||||
local cloud_thickness = climate_api.utility.rangelim(params.biome_humidity * 0.2, 1, 18)
|
||||
local cloud_height = calc_cloud_height(params.heat, params.humidity, params.dewpoint)
|
||||
local wind = climate_api.environment.get_wind({ x = 0, y = cloud_height, z = 0 })
|
||||
|
||||
|
@ -8,7 +8,16 @@ local conditions = {
|
||||
max_windspeed = 2,
|
||||
max_heat = 50,
|
||||
min_time = 4 / 24,
|
||||
max_time = 8 / 24
|
||||
max_time = 8 / 24,
|
||||
not_biome = {
|
||||
"cold_desert",
|
||||
"cold_desert_ocean",
|
||||
"desert",
|
||||
"desert_ocean",
|
||||
"sandstone_desert",
|
||||
"sandstone_desert_ocean",
|
||||
"tundra"
|
||||
}
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
|
@ -1,14 +1,15 @@
|
||||
local name = "regional_weather:hail"
|
||||
|
||||
local conditions = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_heat = 30,
|
||||
max_heat = 45,
|
||||
min_humidity = 65,
|
||||
min_windspeed = 2.5,
|
||||
indoors = false,
|
||||
not_biome = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_heat = 30,
|
||||
max_heat = 45,
|
||||
min_humidity = 65,
|
||||
min_biome_humidity = 26,
|
||||
min_windspeed = 2.5,
|
||||
indoors = false,
|
||||
not_biome = {
|
||||
"cold_desert",
|
||||
"cold_desert_ocean",
|
||||
"desert",
|
||||
|
@ -1,12 +1,22 @@
|
||||
local name = "regional_weather:rain"
|
||||
|
||||
local conditions = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_heat = 35,
|
||||
min_humidity = 50,
|
||||
max_humidity = 65,
|
||||
indoors = false
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_heat = 35,
|
||||
min_humidity = 50,
|
||||
max_humidity = 65,
|
||||
min_biome_humidity = 26,
|
||||
indoors = false,
|
||||
not_biome = {
|
||||
"cold_desert",
|
||||
"cold_desert_ocean",
|
||||
"desert",
|
||||
"desert_ocean",
|
||||
"sandstone_desert",
|
||||
"sandstone_desert_ocean",
|
||||
"tundra"
|
||||
}
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
|
@ -1,11 +1,21 @@
|
||||
local name = "regional_weather:rain_heavy"
|
||||
|
||||
local conditions = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_heat = 40,
|
||||
min_humidity = 65,
|
||||
indoors = false
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_heat = 40,
|
||||
min_humidity = 65,
|
||||
min_biome_humidity = 26,
|
||||
indoors = false,
|
||||
not_biome = {
|
||||
"cold_desert",
|
||||
"cold_desert_ocean",
|
||||
"desert",
|
||||
"desert_ocean",
|
||||
"sandstone_desert",
|
||||
"sandstone_desert_ocean",
|
||||
"tundra"
|
||||
}
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
|
@ -3,16 +3,11 @@ local name = "regional_weather:sandstorm"
|
||||
local conditions = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_heat = 50,
|
||||
max_humidity = 25,
|
||||
min_windspeed = 4.5,
|
||||
min_windspeed = 3,
|
||||
has_biome = {
|
||||
"cold_desert",
|
||||
"cold_desert_ocean",
|
||||
"desert",
|
||||
"desert_ocean",
|
||||
"sandstone_desert",
|
||||
"sandstone_desert_ocean"
|
||||
"sandstone_desert"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,11 +3,12 @@ local name = "regional_weather:snow"
|
||||
local conditions = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
max_heat = 35,
|
||||
min_humidity = 50,
|
||||
max_humidity = 65,
|
||||
indoors = false,
|
||||
not_biome = {
|
||||
max_heat = 35,
|
||||
min_humidity = 50,
|
||||
max_humidity = 65,
|
||||
min_biome_humidity = 26,
|
||||
indoors = false,
|
||||
not_biome = {
|
||||
"cold_desert",
|
||||
"cold_desert_ocean",
|
||||
"desert",
|
||||
|
@ -3,10 +3,11 @@ local name = "regional_weather:snow_heavy"
|
||||
local conditions = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
max_heat = 30,
|
||||
min_humidity = 65,
|
||||
indoors = false,
|
||||
not_biome = {
|
||||
max_heat = 30,
|
||||
min_humidity = 65,
|
||||
min_biome_humidity = 26,
|
||||
indoors = false,
|
||||
not_biome = {
|
||||
"cold_desert",
|
||||
"cold_desert_ocean",
|
||||
"desert",
|
||||
|
@ -19,7 +19,7 @@ local function generate_effects(params)
|
||||
local override = {}
|
||||
|
||||
override["climate_api:sound"] = {
|
||||
gain = math.min(intensity, 1.2)
|
||||
gain = math.min(intensity, 1)
|
||||
}
|
||||
|
||||
return climate_api.utility.merge_tables(effects, override)
|
||||
|
Reference in New Issue
Block a user