diff --git a/README.md b/README.md index 8851644..0a9cace 100644 --- a/README.md +++ b/README.md @@ -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/ diff --git a/ca_effects/leave_color.lua b/ca_effects/leave_color.lua deleted file mode 100644 index e69de29..0000000 diff --git a/ca_weathers/ambient.lua b/ca_weathers/ambient.lua index 35c7277..5206878 100644 --- a/ca_weathers/ambient.lua +++ b/ca_weathers/ambient.lua @@ -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 diff --git a/ca_weathers/deep_cave.lua b/ca_weathers/deep_cave.lua new file mode 100644 index 0000000..64f1499 --- /dev/null +++ b/ca_weathers/deep_cave.lua @@ -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) diff --git a/ca_weathers/hail.lua b/ca_weathers/hail.lua index 231a0e6..c571fb5 100644 --- a/ca_weathers/hail.lua +++ b/ca_weathers/hail.lua @@ -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 = {} diff --git a/ca_weathers/pollen.lua b/ca_weathers/pollen.lua index 0e3dd9d..88c7ff0 100644 --- a/ca_weathers/pollen.lua +++ b/ca_weathers/pollen.lua @@ -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 = {} diff --git a/ca_weathers/rain.lua b/ca_weathers/rain.lua index b095f5e..ae0c73c 100644 --- a/ca_weathers/rain.lua +++ b/ca_weathers/rain.lua @@ -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 = {} diff --git a/ca_weathers/rain_heavy.lua b/ca_weathers/rain_heavy.lua index a1c9327..36898fc 100644 --- a/ca_weathers/rain_heavy.lua +++ b/ca_weathers/rain_heavy.lua @@ -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 = {} diff --git a/ca_weathers/sandstorm.lua b/ca_weathers/sandstorm.lua index b67f311..39e4acb 100644 --- a/ca_weathers/sandstorm.lua +++ b/ca_weathers/sandstorm.lua @@ -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}, diff --git a/ca_weathers/snow.lua b/ca_weathers/snow.lua index 219a8be..f7370ed 100644 --- a/ca_weathers/snow.lua +++ b/ca_weathers/snow.lua @@ -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 = {} diff --git a/ca_weathers/snow_heavy.lua b/ca_weathers/snow_heavy.lua index afc6a2a..28c1956 100644 --- a/ca_weathers/snow_heavy.lua +++ b/ca_weathers/snow_heavy.lua @@ -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) } diff --git a/ca_weathers/storm.lua b/ca_weathers/storm.lua index 4d8325d..d0d55f9 100644 --- a/ca_weathers/storm.lua +++ b/ca_weathers/storm.lua @@ -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 = {} diff --git a/init.lua b/init.lua index 4c696de..4028fc7 100644 --- a/init.lua +++ b/init.lua @@ -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") diff --git a/textures/weather_hud_ice.png b/textures/weather_hud_ice.png new file mode 100644 index 0000000..e5ae6b9 Binary files /dev/null and b/textures/weather_hud_ice.png differ diff --git a/textures/weather_hud_sand.png b/textures/weather_hud_sand.png new file mode 100644 index 0000000..43e24f1 Binary files /dev/null and b/textures/weather_hud_sand.png differ