2020-04-13 01:58:27 +02:00
|
|
|
local name = "regional_weather:hail"
|
|
|
|
|
|
|
|
local conditions = {
|
|
|
|
min_height = regional_weather.settings.min_height,
|
|
|
|
max_height = regional_weather.settings.max_height,
|
2020-05-13 16:05:21 +02:00
|
|
|
min_heat = 30,
|
2020-04-13 01:58:27 +02:00
|
|
|
max_heat = 45,
|
|
|
|
min_humidity = 65,
|
2020-04-16 08:04:06 +02:00
|
|
|
min_windspeed = 2.5,
|
2020-10-08 22:03:00 +02:00
|
|
|
indoors = false,
|
2020-05-29 21:53:33 +02:00
|
|
|
not_biome = {
|
|
|
|
"cold_desert",
|
|
|
|
"cold_desert_ocean",
|
|
|
|
"desert",
|
|
|
|
"desert_ocean",
|
|
|
|
"sandstone_desert",
|
|
|
|
"sandstone_desert_ocean"
|
|
|
|
}
|
2020-04-13 01:58:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
local effects = {}
|
|
|
|
|
2020-04-28 01:23:46 +02:00
|
|
|
effects["climate_api:damage"] = {
|
2020-05-13 16:05:21 +02:00
|
|
|
rarity = 15,
|
2020-04-28 01:23:46 +02:00
|
|
|
value = 3,
|
|
|
|
check = {
|
|
|
|
type = "raycast",
|
|
|
|
height = 7,
|
|
|
|
velocity = 20
|
|
|
|
}
|
2020-04-22 00:54:27 +02:00
|
|
|
}
|
2020-04-13 01:58:27 +02:00
|
|
|
|
|
|
|
effects["climate_api:sound"] = {
|
|
|
|
name = "weather_hail",
|
|
|
|
gain = 1
|
|
|
|
}
|
|
|
|
|
2020-05-12 16:01:13 +02:00
|
|
|
effects["regional_weather:lightning"] = 1 / 30
|
|
|
|
|
2020-04-28 01:23:46 +02:00
|
|
|
local textures = {}
|
|
|
|
for i = 1,5 do
|
|
|
|
textures[i] = "weather_hail" .. i .. ".png"
|
|
|
|
end
|
|
|
|
|
2020-04-13 01:58:27 +02:00
|
|
|
effects["climate_api:particles"] = {
|
2020-05-12 16:01:13 +02:00
|
|
|
boxsize = { x = 18, y = 0, z = 18 },
|
2020-04-28 01:23:46 +02:00
|
|
|
v_offset = 7,
|
|
|
|
velocity = 20,
|
|
|
|
amount = 6,
|
|
|
|
expirationtime = 0.7,
|
|
|
|
texture = textures,
|
|
|
|
glow = 5
|
2020-04-13 01:58:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
climate_api.register_weather(name, conditions, effects)
|