Change weather to be outside only, add underground skybox, add hud overlays

This commit is contained in:
Till Affeldt 2020-04-16 08:04:06 +02:00
parent 1e1126abcd
commit bac1618a3c
15 changed files with 71 additions and 19 deletions

View File

@ -20,6 +20,9 @@ Experience the humid air of the rain forest and harsh desert sandstorms.
- Wind sound: *CC BY (3.0)* by InspectorJ from https://freesound.org/people/InspectorJ/sounds/376415/
- Hail sound: *CC0* by ikayuka from https://freesound.org/people/ikayuka/sounds/240742/
### Other
- Original ice hud overlay: *CC0* by Simon Matzinger from https://freestocktextures.com/texture/winter-snow-frozen,995.html, edits by me under *CC0* as well
### Assets in screenshots
- All screenshots and editing by me: *CC BY-SA (4.0)*
- Lato Font (for the Logo): *OFL* by Łukasz Dziedzic from http://www.latofonts.com/lato-free-fonts/

View File

@ -2,15 +2,17 @@ local name = "regional_weather:ambient"
local CLOUD_SPEED = 1.8
local conditions = {}
local conditions = {
min_light = 15
}
local function generate_effects(params)
local override = {}
override["climate_api:clouds"] = {
--[[override["climate_api:clouds"] = {
size = climate_api.utility.rangelim(params.humidity / 100, 0.25, 0.98),
speed = vector.multiply(params.wind, CLOUD_SPEED)
}
}]]
local movement = params.player:get_player_velocity()
local movement_direction

20
ca_weathers/deep_cave.lua Normal file
View File

@ -0,0 +1,20 @@
local name = "regional_weather:deep_cave"
local conditions = {
max_light = 14,
--max_height = -100
}
local effects = {}
effects["climate_api:skybox"] = {
sky_data = {
type = "plain",
base_color = { r = 0, g = 0, b = 0 },
clouds = false
},
sun_data = { visible = false },
moon_data = { visible = false },
stars_data = { visible = false }
}
climate_api.register_weather(name, conditions, effects)

View File

@ -5,7 +5,8 @@ local conditions = {
max_height = regional_weather.settings.max_height,
max_heat = 45,
min_humidity = 65,
min_windspeed = 2.5
min_windspeed = 2.5,
min_light = 15
}
local effects = {}

View File

@ -6,7 +6,8 @@ local conditions = {
min_heat = 40,
min_humidity = 30,
max_humidity = 40,
max_windspeed = 2
max_windspeed = 2,
min_light = 15
}
local effects = {}

View File

@ -5,7 +5,8 @@ local conditions = {
max_height = regional_weather.settings.max_height,
min_heat = 30,
min_humidity = 50,
max_humidity = 65
max_humidity = 65,
min_light = 15
}
local effects = {}

View File

@ -4,7 +4,8 @@ local conditions = {
min_height = regional_weather.settings.min_height,
max_height = regional_weather.settings.max_height,
min_heat = 40,
min_humidity = 65
min_humidity = 65,
min_light = 15
}
local effects = {}

View File

@ -5,12 +5,16 @@ local conditions = {
max_height = regional_weather.settings.max_height,
min_heat = 50,
max_humidity = 25,
min_windspeed = 6
min_windspeed = 6,
min_light = 15
}
local effects = {}
effects["regional_weather:damage"] = true
effects["climate_api:hud_overlay"] = {
file = "weather_hud_sand.png",
z_index = -100
}
effects["climate_api:particles"] = {
min_pos = {x=-9, y=-5, z=-9},

View File

@ -5,7 +5,8 @@ local conditions = {
max_height = regional_weather.settings.max_height,
max_heat = 40,
min_humidity = 50,
max_humidity = 65
max_humidity = 65,
min_light = 15
}
local effects = {}

View File

@ -4,21 +4,37 @@ local conditions = {
min_height = regional_weather.settings.min_height,
max_height = regional_weather.settings.max_height,
max_heat = 30,
min_humidity = 65
min_humidity = 65,
min_light = 15
}
local effects = {}
effects["regional_weather:spawn_snow"] = true
effects["climate_api:hud_overlay"] = {
file = "weather_hud_ice.png",
z_index = -100
}
effects["climate_api:particles"] = {
min_pos = {x=-12, y= 5, z=-12},
max_pos = {x= 12, y=9, z= 12},
exptime=8,
min_pos = {x=-8, y=3, z=-8},
max_pos = {x= 8, y=6, z= 8},
exptime=6,
size=12,
texture="weather_snow.png"
}
effects["climate_api:skybox"] = {
sky_data = {
type = "plain",
base_color = {r=106, g=130, b=142},
clouds = true
},
cloud_data = {
size = 0.98,
speed = {x = 4, y = 0, z = -1.3}
}
}
local function generate_effects(params)
local avg_humidity = 55
local intensity = params.humidity / avg_humidity
@ -29,7 +45,7 @@ local function generate_effects(params)
}
override["climate_api:particles"] = {
amount = 50 * math.min(intensity, 1.5),
amount = 8 * math.min(intensity, 1.5),
falling_speed = 1 / math.min(intensity, 1.3)
}

View File

@ -1,9 +1,10 @@
local name = "regional_weather:storm"
local conditions = {
min_height = regional_weather.settings.min_height,
max_height = regional_weather.settings.max_height,
min_windspeed = 3
min_height = regional_weather.settings.min_height,
max_height = regional_weather.settings.max_height,
min_windspeed = 3,
min_light = 15
}
local effects = {}

View File

@ -20,6 +20,7 @@ regional_weather.settings.min_height = get_setting_number("min_height", -50)
-- import individual weather types
dofile(modpath.."/ca_weathers/ambient.lua")
dofile(modpath.."/ca_weathers/deep_cave.lua")
dofile(modpath.."/ca_weathers/hail.lua")
dofile(modpath.."/ca_weathers/pollen.lua")
dofile(modpath.."/ca_weathers/rain.lua")

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB