2020-04-22 00:54:27 +02:00
|
|
|
local name = "regional_weather:fog"
|
|
|
|
|
|
|
|
local conditions = {
|
2020-04-24 01:36:58 +02:00
|
|
|
min_height = regional_weather.settings.min_height,
|
|
|
|
max_height = regional_weather.settings.max_height,
|
2023-02-24 08:24:31 +01:00
|
|
|
min_humidity = 25,
|
2020-04-24 01:36:58 +02:00
|
|
|
max_humidity = 50,
|
|
|
|
max_windspeed = 2,
|
2023-02-24 08:24:31 +01:00
|
|
|
max_heat = 50,
|
|
|
|
min_time = 4 / 24,
|
|
|
|
max_time = 8 / 24
|
2020-04-22 00:54:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
local effects = {}
|
|
|
|
|
2023-02-24 08:24:31 +01:00
|
|
|
effects["climate_api:hud_overlay"] = {
|
|
|
|
file = "weather_hud_fog.png^[opacity:100",
|
|
|
|
z_index = -200,
|
|
|
|
color_correction = true
|
|
|
|
}
|
|
|
|
|
2020-04-22 00:54:27 +02:00
|
|
|
effects["climate_api:skybox"] = {
|
2020-04-24 01:36:58 +02:00
|
|
|
sky_data = {
|
2023-02-24 08:24:31 +01:00
|
|
|
type = "plain",
|
|
|
|
base_color = "#c0c0c08f",
|
2020-04-24 01:36:58 +02:00
|
|
|
clouds = true
|
|
|
|
},
|
2020-04-22 00:54:27 +02:00
|
|
|
cloud_data = {
|
|
|
|
density = 1,
|
2020-04-24 19:52:03 +02:00
|
|
|
color = "#ffffff80",
|
2020-04-22 00:54:27 +02:00
|
|
|
thickness = 40,
|
|
|
|
speed = {x=0,y=0,z=0}
|
|
|
|
},
|
2023-02-24 08:24:31 +01:00
|
|
|
light_data = {
|
|
|
|
shadow_intensity = 0.1,
|
|
|
|
saturation = 0.5
|
|
|
|
},
|
2020-04-22 00:54:27 +02:00
|
|
|
priority = 50
|
|
|
|
}
|
|
|
|
|
|
|
|
local function generate_effects(params)
|
|
|
|
local override = {}
|
|
|
|
override["climate_api:skybox"] = {
|
|
|
|
cloud_data = {
|
2020-04-24 01:36:58 +02:00
|
|
|
height = params.player:get_pos().y - 20
|
2020-04-22 00:54:27 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return climate_api.utility.merge_tables(effects, override)
|
|
|
|
end
|
|
|
|
|
|
|
|
climate_api.register_weather(name, conditions, generate_effects)
|