1
0
mirror of https://github.com/t-affeldt/regional_weather.git synced 2025-07-22 18:30:25 +02:00

Update to new wind system, make puddles rotational, change hail conditions

This commit is contained in:
Till Affeldt
2020-05-13 16:05:21 +02:00
parent e874daa894
commit 2d289abbd1
4 changed files with 64 additions and 59 deletions

View File

@ -1,5 +1,4 @@
local name = "regional_weather:ambient"
local CLOUD_SPEED = 1.8
local conditions = {}
@ -15,14 +14,16 @@ end
local function generate_effects(params)
local override = {}
local wind = climate_api.environment.get_wind()
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 })
local skybox = {priority = 10}
skybox.cloud_data = {
density = climate_api.utility.rangelim(params.humidity / 100, 0.15, 0.65),
speed = vector.multiply(wind, CLOUD_SPEED),
speed = wind,
thickness = climate_api.utility.rangelim(params.base_humidity * 0.2, 1, 18),
height = calc_cloud_height(params.heat, params.humidity, params.dewpoint),
height = cloud_height,
ambient = "#0f0f1050"
}

View File

@ -3,6 +3,7 @@ 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,
@ -12,7 +13,7 @@ local conditions = {
local effects = {}
effects["climate_api:damage"] = {
chance = 15,
rarity = 15,
value = 3,
check = {
type = "raycast",

View File

@ -25,7 +25,7 @@ effects["climate_api:hud_overlay"] = {
}
effects["climate_api:damage"] = {
chance = 3,
rarity = 3,
value = 1,
check = {
type = "raycast",