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,
|
|
|
|
min_humidity = 40,
|
|
|
|
max_humidity = 50,
|
|
|
|
max_windspeed = 2,
|
|
|
|
min_heat = 40,
|
|
|
|
max_heat = 50
|
2020-04-22 00:54:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
local effects = {}
|
|
|
|
|
|
|
|
effects["climate_api:skybox"] = {
|
2020-04-24 01:36:58 +02:00
|
|
|
sky_data = {
|
|
|
|
clouds = true
|
|
|
|
},
|
2020-04-22 00:54:27 +02:00
|
|
|
cloud_data = {
|
|
|
|
density = 1,
|
2020-04-24 01:36:58 +02:00
|
|
|
color = "#ffffff00",
|
2020-04-22 00:54:27 +02:00
|
|
|
thickness = 40,
|
|
|
|
speed = {x=0,y=0,z=0}
|
|
|
|
},
|
|
|
|
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)
|