mirror of
https://github.com/t-affeldt/climate_api.git
synced 2025-07-02 16:30:42 +02:00
Sync first working prototype
This commit is contained in:
12
weathers/clear.lua
Normal file
12
weathers/clear.lua
Normal file
@ -0,0 +1,12 @@
|
||||
local name = weather_mod.modname .. ":clear"
|
||||
|
||||
local weather = {
|
||||
priority = 0
|
||||
}
|
||||
|
||||
weather.clouds = {
|
||||
density = 0.3,
|
||||
color = "#fff0f0c5"
|
||||
}
|
||||
|
||||
weather_mod.register_weather(name, weather)
|
30
weathers/rain.lua
Normal file
30
weathers/rain.lua
Normal file
@ -0,0 +1,30 @@
|
||||
local name = weather_mod.modname .. ":rain"
|
||||
|
||||
local weather = {
|
||||
priority = 10,
|
||||
spawn_puddles = true,
|
||||
wetten_farmland = true,
|
||||
sound = "weather_rain1"
|
||||
}
|
||||
|
||||
weather.particles = {
|
||||
min_pos = {x=-9, y=7, z=-9},
|
||||
max_pos = {x= 9, y=7, z= 9},
|
||||
falling_speed=10,
|
||||
amount=20,
|
||||
exptime=0.8,
|
||||
size=25,
|
||||
texture="weather_rain.png"
|
||||
}
|
||||
|
||||
weather.clouds = {
|
||||
density = 0.5,
|
||||
color = "#a4a0b6e5"
|
||||
}
|
||||
|
||||
weather.conditions = {
|
||||
min_heat = 30,
|
||||
min_humidity = 40
|
||||
}
|
||||
|
||||
weather_mod.register_weather(name, weather)
|
33
weathers/rainstorm.lua
Normal file
33
weathers/rainstorm.lua
Normal file
@ -0,0 +1,33 @@
|
||||
local name = weather_mod.modname .. ":rainstorm"
|
||||
|
||||
local weather = {
|
||||
priority = 30,
|
||||
damage = true,
|
||||
spawn_puddles = true,
|
||||
wetten_farmland = true,
|
||||
lightning = true,
|
||||
sound = "weather_rain2"
|
||||
}
|
||||
|
||||
weather.particles = {
|
||||
min_pos = {x=-9, y=7, z=-9},
|
||||
max_pos = {x= 9, y=7, z= 9},
|
||||
falling_speed=10,
|
||||
amount=25,
|
||||
exptime=0.8,
|
||||
size=25,
|
||||
texture="weather_rain.png"
|
||||
}
|
||||
|
||||
weather.clouds = {
|
||||
density = 0.7,
|
||||
color = "#a4a0b6f5"
|
||||
}
|
||||
|
||||
weather.conditions = {
|
||||
min_heat = 30,
|
||||
min_humidity = 60,
|
||||
min_windspeed = 5
|
||||
}
|
||||
|
||||
weather_mod.register_weather(name, weather)
|
30
weathers/sandstorm.lua
Normal file
30
weathers/sandstorm.lua
Normal file
@ -0,0 +1,30 @@
|
||||
local name = weather_mod.modname .. ":sandstorm"
|
||||
|
||||
local weather = {
|
||||
priority = 50,
|
||||
damage = true,
|
||||
sound = "weather_wind"
|
||||
}
|
||||
|
||||
weather.particles = {
|
||||
min_pos = {x=-9, y=-5, z=-9},
|
||||
max_pos = {x= 9, y= 5, z= 9},
|
||||
falling_speed=1,
|
||||
amount=40,
|
||||
exptime=0.8,
|
||||
size=15,
|
||||
texture="weather_sand.png"
|
||||
}
|
||||
|
||||
weather.clouds = {
|
||||
density = 0.3,
|
||||
color = "#a4a0b685"
|
||||
}
|
||||
|
||||
weather.conditions = {
|
||||
min_heat = 50,
|
||||
max_humidity = 25,
|
||||
min_windspeed = 6
|
||||
}
|
||||
|
||||
weather_mod.register_weather(name, weather)
|
32
weathers/snow.lua
Normal file
32
weathers/snow.lua
Normal file
@ -0,0 +1,32 @@
|
||||
local name = weather_mod.modname .. ":snow"
|
||||
|
||||
local weather = {
|
||||
priority = 20,
|
||||
spawn_snow = true
|
||||
}
|
||||
|
||||
weather.particles = {
|
||||
min_pos = {x=-20, y= 3, z=-20},
|
||||
max_pos = {x= 20, y=12, z= 20},
|
||||
falling_speed=1,
|
||||
amount=50,
|
||||
exptime=15,
|
||||
size=1,
|
||||
textures = {}
|
||||
}
|
||||
|
||||
for i = 1,12,1 do
|
||||
weather.particles.textures[i] = "weather_snowflake" .. i .. ".png"
|
||||
end
|
||||
|
||||
weather.clouds = {
|
||||
density = 0.5,
|
||||
color = "#a4a0b6e5"
|
||||
}
|
||||
|
||||
weather.conditions = {
|
||||
max_heat = 30,
|
||||
min_humidity = 40
|
||||
}
|
||||
|
||||
weather_mod.register_weather(name, weather)
|
36
weathers/snowstorm.lua
Normal file
36
weathers/snowstorm.lua
Normal file
@ -0,0 +1,36 @@
|
||||
local name = weather_mod.modname .. ":snowstorm"
|
||||
|
||||
local weather = {
|
||||
priority = 40,
|
||||
damage = true,
|
||||
lightning = true,
|
||||
spawn_snow = true,
|
||||
sound = "weather_wind"
|
||||
}
|
||||
|
||||
weather.particles = {
|
||||
min_pos = {x=-9, y=-5, z=-9},
|
||||
max_pos = {x= 9, y= 5, z= 9},
|
||||
falling_speed=1.5,
|
||||
amount=70,
|
||||
exptime=6,
|
||||
size=1,
|
||||
textures = {}
|
||||
}
|
||||
|
||||
for i = 1,12,1 do
|
||||
weather.particles.textures[i] = "weather_snowflake" .. i .. ".png"
|
||||
end
|
||||
|
||||
weather.clouds = {
|
||||
density = 0.7,
|
||||
color = "#a4a0b6f5"
|
||||
}
|
||||
|
||||
weather.conditions = {
|
||||
max_heat = 30,
|
||||
min_humidity = 60,
|
||||
min_windspeed = 5
|
||||
}
|
||||
|
||||
weather_mod.register_weather(name, weather)
|
Reference in New Issue
Block a user