mirror of
https://github.com/t-affeldt/regional_weather.git
synced 2025-07-21 09:55:29 +02:00
Improve heavy snow performance, add pedology support, add documentation
This commit is contained in:
@ -17,24 +17,13 @@ effects["climate_api:hud_overlay"] = {
|
||||
}
|
||||
|
||||
effects["climate_api:particles"] = {
|
||||
min_pos = {x=-8, y=3, z=-8},
|
||||
max_pos = {x= 8, y=6, z= 8},
|
||||
exptime=6,
|
||||
size=10,
|
||||
min_pos = {x=-7, y=3, z=-7},
|
||||
max_pos = {x= 7, y=6, z= 7},
|
||||
exptime=7.5,
|
||||
size=15,
|
||||
amount=6,
|
||||
falling_speed = 0.75,
|
||||
texture="weather_snow.png"
|
||||
}
|
||||
|
||||
local function generate_effects(params)
|
||||
local avg_humidity = 55
|
||||
local intensity = params.humidity / avg_humidity
|
||||
local override = {}
|
||||
|
||||
override["climate_api:particles"] = {
|
||||
amount = 16 * math.min(intensity, 1.5),
|
||||
falling_speed = 1 / math.min(intensity, 1.3)
|
||||
}
|
||||
|
||||
return climate_api.utility.merge_tables(effects, override)
|
||||
end
|
||||
|
||||
climate_api.register_weather(name, conditions, generate_effects)
|
||||
climate_api.register_weather(name, conditions, effects)
|
||||
|
Reference in New Issue
Block a user