Add new textures, tweak effects, add fog and freezing of river water
33
README.md
@ -1,22 +1,32 @@
|
|||||||
# Regional Weather
|
# Regional Weather
|
||||||
A weather pack for __Climate API__ by Till Affeldt (TestificateMods)
|
A weather pack for [__Climate API__](https://github.com/t-affeldt/climate_api) by Till Affeldt (TestificateMods)
|
||||||
|
|
||||||
|
![](https://raw.githubusercontent.com/t-affeldt/regional_weather/master/screenshot.png)
|
||||||
|
|
||||||
Not every biome is the same and neither should their weather be.
|
Not every biome is the same and neither should their weather be.
|
||||||
Regional Weather controls it's effects with the local climate in mind.
|
Regional Weather controls it's effects with the local climate in mind.
|
||||||
Experience the humid air of the rain forest and harsh desert sandstorms.
|
Experience the humid air of the rain forest and harsh desert sandstorms.
|
||||||
|
|
||||||
## Assets
|
## License information
|
||||||
|
### Source Code
|
||||||
|
Unless otherwise stated, this source code is written entirely by myself.
|
||||||
|
You are free to use it under a GNU Lesser General Public License version 3.
|
||||||
|
You can find respective rights and conditions in the attached [LICENSE](https://github.com/t-affeldt/regional_weather/blob/master/LICENSE.md) file.
|
||||||
|
The entire source code is available on [Github](https://github.com/t-affeldt/regional_weather).
|
||||||
|
|
||||||
### Particles
|
### Particles
|
||||||
- Rain sounds: *CC0* by Q.K., taken from mymonths at https://github.com/minetest-mods/mymonths/tree/master/sounds
|
- Hail textures: *CC BY-SA (4.0)* made by me
|
||||||
- Snow flake and rain drop textures: *CC BY-SA (3.0)* by paramat, found in snowdrift mod at https://github.com/paramat/snowdrift
|
- Snow flake textures: *CC BY-SA (3.0)* by paramat, found in snowdrift mod at https://github.com/paramat/snowdrift
|
||||||
- Snow texture: *CC BY-SA (3.0)* composited from individual snow flakes by paramat.
|
- Snow composite texture: *CC BY-SA (3.0)* by Piet Affeldt, created from aforementioned snow flakes by paramat (please credit original artist as well)
|
||||||
- Rain texture: *CC BY-SA (3.0)* from TeddyDesTodes, taken from his weather branch at https://github.com/TeddyDesTodes/minetest/tree/weather
|
- Rain textures: *CC BY-SA (3.0)* by Piet Affeldt (an original design for this mod)
|
||||||
|
|
||||||
### Block Textures
|
### Block Textures
|
||||||
- Puddle texture: *DWYWPL* by Don, Nathan from mymonths at https://github.com/minetest-mods/mymonths/blob/master/textures/weather_puddle.png
|
- Puddle texture: *CC BY-SA (3.0)* by Piet Affeldt
|
||||||
- Snow cover texture: *WTFPL*, taken from mymonths at https://github.com/minetest-mods/mymonths/blob/master/textures/weather_snow_cover.png
|
- Snow layers and ice block using textures from *default* (not included)
|
||||||
|
|
||||||
### Sounds
|
### Sounds
|
||||||
|
- Heavy Rain sounds: *CC0* by Q.K., taken from mymonths at https://github.com/minetest-mods/mymonths/tree/master/sounds
|
||||||
|
- Light Rain sounds: *CC BY 3.0* by Arctura from https://freesound.org/people/Arctura/sounds/34065/
|
||||||
- Wind sound: *CC BY (3.0)* by InspectorJ from https://freesound.org/people/InspectorJ/sounds/376415/
|
- 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/
|
- Hail sound: *CC0* by ikayuka from https://freesound.org/people/ikayuka/sounds/240742/
|
||||||
|
|
||||||
@ -28,4 +38,9 @@ Experience the humid air of the rain forest and harsh desert sandstorms.
|
|||||||
- All screenshots and editing by me: *CC BY-SA (4.0)*
|
- 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/
|
- Lato Font (for the Logo): *OFL* by Łukasz Dziedzic from http://www.latofonts.com/lato-free-fonts/
|
||||||
- Liberation Fonts (for the text): *OFL*, see https://github.com/liberationfonts/liberation-fonts
|
- Liberation Fonts (for the text): *OFL*, see https://github.com/liberationfonts/liberation-fonts
|
||||||
- Used texture pack: Polygonia (128px edition) *CC BY-SA (4.0)* by Lokrates. See https://forum.minetest.net/viewtopic.php?f=4&t=19043
|
- Used texture pack: Polygonia (128px edition) *CC BY-SA (4.0)* by Lokrates. See https://forum.minetest.net/viewtopic.php?f=4&t=19043
|
||||||
|
|
||||||
|
### Full License Conditions
|
||||||
|
- [GNU Lesser General Public License version 4](https://github.com/t-affeldt/regional_weather/blob/master/LICENSE.md)
|
||||||
|
- [Creative Commons Licenses](https://creativecommons.org/licenses/)
|
||||||
|
- [SIL Open Font License](https://opensource.org/licenses/OFL-1.1)
|
60
abms/ice.lua
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
if not regional_weather.settings.ice
|
||||||
|
or not minetest.get_modpath("default")
|
||||||
|
or default.node_sound_glass_defaults == nil
|
||||||
|
then return end
|
||||||
|
|
||||||
|
local BLOCK_NAME = "regional_weather:ice"
|
||||||
|
|
||||||
|
minetest.register_node(BLOCK_NAME, {
|
||||||
|
tiles = {"(default_ice.png^[colorize:#ffffff:50)^[opacity:200"},
|
||||||
|
paramtype = "light",
|
||||||
|
groups = {cracky = 3, cools_lava = 1, slippery = 3, dig_immediate = 2},
|
||||||
|
sounds = default.node_sound_glass_defaults(),
|
||||||
|
use_texture_alpha = true,
|
||||||
|
drop = "",
|
||||||
|
on_destruct = function(pos)
|
||||||
|
-- asynchronous to avoid destruction loop
|
||||||
|
minetest.after(0, function(pos)
|
||||||
|
if minetest.get_node(pos).name ~= "air" then return end
|
||||||
|
minetest.set_node(pos, { name = "default:river_water_source" })
|
||||||
|
end, pos)
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
climate_api.register_abm({
|
||||||
|
label = "freeze river water",
|
||||||
|
nodenames = { "default:river_water_source" },
|
||||||
|
neighbors = { "air" },
|
||||||
|
interval = 10,
|
||||||
|
chance = 2,
|
||||||
|
|
||||||
|
conditions = {
|
||||||
|
min_height = regional_weather.settings.min_height,
|
||||||
|
max_height = regional_weather.settings.max_height,
|
||||||
|
max_heat = 25,
|
||||||
|
daylight = 15
|
||||||
|
},
|
||||||
|
|
||||||
|
action = function (pos, node, env)
|
||||||
|
minetest.set_node(pos, { name = BLOCK_NAME })
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
climate_api.register_abm({
|
||||||
|
label = "unfreeze river water",
|
||||||
|
nodenames = { BLOCK_NAME },
|
||||||
|
neighbors = { "air" },
|
||||||
|
interval = 15,
|
||||||
|
chance = 4,
|
||||||
|
|
||||||
|
conditions = {
|
||||||
|
min_height = regional_weather.settings.min_height,
|
||||||
|
max_height = regional_weather.settings.max_height,
|
||||||
|
min_heat = 40,
|
||||||
|
daylight = 15
|
||||||
|
},
|
||||||
|
|
||||||
|
action = function (pos, node, env)
|
||||||
|
minetest.set_node(pos, { name = "default:river_water_source" })
|
||||||
|
end
|
||||||
|
})
|
@ -11,14 +11,9 @@ if not regional_weather.settings.puddles then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
--Puddle node
|
|
||||||
local node_box = {
|
local node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.49, 0.5}
|
||||||
{-0.1875, -0.5, -0.375, 0.125, -0.4875, 0.3125},
|
|
||||||
{-0.25, -0.5, -0.3125, 0.3125, -0.4925, 0.25},
|
|
||||||
{-0.3125, -0.5, -0.1875, 0.375, -0.4975, 0.1875},
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
minetest.register_node(BLOCK_NAME, {
|
minetest.register_node(BLOCK_NAME, {
|
||||||
@ -30,14 +25,15 @@ minetest.register_node(BLOCK_NAME, {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
alpha = 50,
|
use_texture_alpha = true,
|
||||||
node_box = node_box,
|
node_box = node_box,
|
||||||
groups = {
|
groups = {
|
||||||
not_in_creative_inventory = 1,
|
not_in_creative_inventory = 1,
|
||||||
crumbly = 3,
|
crumbly = 3,
|
||||||
attached_node = 1,
|
attached_node = 1,
|
||||||
slippery = 1,
|
slippery = 1,
|
||||||
flora = 1
|
flora = 1,
|
||||||
|
water = 1
|
||||||
},
|
},
|
||||||
drop = "",
|
drop = "",
|
||||||
})
|
})
|
||||||
|
@ -14,6 +14,13 @@ or not regional_weather.settings.snow then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local destruction_handler = function(pos)
|
||||||
|
pos.y = pos.y - 1
|
||||||
|
if minetest.get_node(pos).name == "default:dirt_with_snow" then
|
||||||
|
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
for i = 1,5 do
|
for i = 1,5 do
|
||||||
local node_box = {
|
local node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
@ -43,12 +50,8 @@ for i = 1,5 do
|
|||||||
minetest.set_node(pos, {name = "default:dirt_with_snow"})
|
minetest.set_node(pos, {name = "default:dirt_with_snow"})
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
on_destruct = function(pos)
|
on_destruct = destruction_handler,
|
||||||
pos.y = pos.y - 1
|
on_flood = destruction_handler
|
||||||
if minetest.get_node(pos).name == "default:dirt_with_snow" then
|
|
||||||
minetest.set_node(pos, {name = "default:dirt_with_grass"})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,17 +1,22 @@
|
|||||||
if not regional_weather.settings.damage then return end
|
if not minetest.is_yes(minetest.settings:get_bool("enable_damage"))
|
||||||
|
or not regional_weather.settings.damage then return end
|
||||||
|
|
||||||
local EFFECT_NAME = "regional_weather:damage"
|
local EFFECT_NAME = "regional_weather:damage"
|
||||||
|
|
||||||
|
local rng = PcgRandom(7819792)
|
||||||
|
|
||||||
local function handle_effect(player_data)
|
local function handle_effect(player_data)
|
||||||
for playername, data in pairs(player_data) do
|
for playername, data in pairs(player_data) do
|
||||||
local player = minetest.get_player_by_name(playername)
|
local player = minetest.get_player_by_name(playername)
|
||||||
local hp = player:get_hp()
|
local hp = player:get_hp()
|
||||||
for weather, value in pairs(data) do
|
for weather, dmg in pairs(data) do
|
||||||
hp = hp - value
|
if rng:next(1, dmg.chance) == 1 then
|
||||||
|
hp = hp - dmg.value
|
||||||
|
end
|
||||||
end
|
end
|
||||||
player:set_hp(hp, "weather damage")
|
player:set_hp(hp, "weather damage")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
climate_api.register_effect(EFFECT_NAME, handle_effect, "tick")
|
climate_api.register_effect(EFFECT_NAME, handle_effect, "tick")
|
||||||
climate_api.set_effect_cycle(EFFECT_NAME, climate_api.LONG_CYCLE)
|
climate_api.set_effect_cycle(EFFECT_NAME, climate_api.MEDIUM_CYCLE)
|
@ -1,5 +1,4 @@
|
|||||||
local name = "regional_weather:ambient"
|
local name = "regional_weather:ambient"
|
||||||
|
|
||||||
local CLOUD_SPEED = 1.8
|
local CLOUD_SPEED = 1.8
|
||||||
|
|
||||||
local conditions = {}
|
local conditions = {}
|
||||||
@ -8,9 +7,9 @@ local function generate_effects(params)
|
|||||||
local override = {}
|
local override = {}
|
||||||
local wind = climate_api.environment.get_wind()
|
local wind = climate_api.environment.get_wind()
|
||||||
|
|
||||||
local skybox = {}
|
local skybox = {priority = 0}
|
||||||
skybox.cloud_data = {
|
skybox.cloud_data = {
|
||||||
size = climate_api.utility.rangelim(params.humidity / 100, 0.25, 0.98),
|
density = climate_api.utility.rangelim(params.humidity / 100, 0.25, 0.98),
|
||||||
speed = vector.multiply(wind, CLOUD_SPEED),
|
speed = vector.multiply(wind, CLOUD_SPEED),
|
||||||
thickness = climate_api.utility.rangelim(params.base_humidity * 0.2, 1, 18)
|
thickness = climate_api.utility.rangelim(params.base_humidity * 0.2, 1, 18)
|
||||||
}
|
}
|
||||||
@ -18,7 +17,6 @@ local function generate_effects(params)
|
|||||||
if params.height > -100 and params.humidity > 65 then
|
if params.height > -100 and params.humidity > 65 then
|
||||||
skybox.sky_data = {
|
skybox.sky_data = {
|
||||||
type = "regular",
|
type = "regular",
|
||||||
--base_color = { r = 106, g = 130, b = 142 },
|
|
||||||
clouds = true,
|
clouds = true,
|
||||||
sky_color = {
|
sky_color = {
|
||||||
day_sky = "#6a828e",
|
day_sky = "#6a828e",
|
||||||
@ -31,7 +29,7 @@ local function generate_effects(params)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
override["climate_api:skybox"] = skybox
|
--override["climate_api:skybox"] = skybox
|
||||||
|
|
||||||
local movement = params.player:get_player_velocity()
|
local movement = params.player:get_player_velocity()
|
||||||
local movement_direction
|
local movement_direction
|
||||||
|
@ -17,7 +17,8 @@ effects["climate_api:skybox"] = {
|
|||||||
sunrise_visible = false
|
sunrise_visible = false
|
||||||
},
|
},
|
||||||
moon_data = { visible = false },
|
moon_data = { visible = false },
|
||||||
stars_data = { visible = false }
|
star_data = { visible = false },
|
||||||
|
priority = 100
|
||||||
}
|
}
|
||||||
|
|
||||||
climate_api.register_weather(name, conditions, effects)
|
climate_api.register_weather(name, conditions, effects)
|
||||||
|
34
ca_weathers/fog.lua
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
local name = "regional_weather:fog"
|
||||||
|
|
||||||
|
local conditions = {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
local effects = {}
|
||||||
|
|
||||||
|
effects["climate_api:hud_overlay"] = {
|
||||||
|
file = "weather_hud_fog.png",
|
||||||
|
z_index = -200
|
||||||
|
}
|
||||||
|
|
||||||
|
effects["climate_api:skybox"] = {
|
||||||
|
cloud_data = {
|
||||||
|
density = 1,
|
||||||
|
color = "#ffffffff",
|
||||||
|
thickness = 40,
|
||||||
|
speed = {x=0,y=0,z=0}
|
||||||
|
},
|
||||||
|
priority = 50
|
||||||
|
}
|
||||||
|
|
||||||
|
local function generate_effects(params)
|
||||||
|
local override = {}
|
||||||
|
override["climate_api:skybox"] = {
|
||||||
|
cloud_data = {
|
||||||
|
height = params.player:get_pos().y
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return climate_api.utility.merge_tables(effects, override)
|
||||||
|
end
|
||||||
|
|
||||||
|
climate_api.register_weather(name, conditions, generate_effects)
|
@ -11,7 +11,10 @@ local conditions = {
|
|||||||
|
|
||||||
local effects = {}
|
local effects = {}
|
||||||
|
|
||||||
effects["regional_weather:damage"] = 1
|
effects["regional_weather:damage"] = {
|
||||||
|
chance = 15,
|
||||||
|
value = 3
|
||||||
|
}
|
||||||
|
|
||||||
effects["climate_api:sound"] = {
|
effects["climate_api:sound"] = {
|
||||||
name = "weather_hail",
|
name = "weather_hail",
|
||||||
@ -21,9 +24,9 @@ effects["climate_api:sound"] = {
|
|||||||
effects["climate_api:particles"] = {
|
effects["climate_api:particles"] = {
|
||||||
min_pos = {x=-9, y=7, z=-9},
|
min_pos = {x=-9, y=7, z=-9},
|
||||||
max_pos = {x= 9, y=7, z= 9},
|
max_pos = {x= 9, y=7, z= 9},
|
||||||
falling_speed=15,
|
falling_speed=20,
|
||||||
amount=5,
|
amount=6,
|
||||||
exptime=0.8,
|
exptime=0.7,
|
||||||
size=1,
|
size=1,
|
||||||
textures = {}
|
textures = {}
|
||||||
}
|
}
|
||||||
|
@ -12,14 +12,15 @@ local conditions = {
|
|||||||
local effects = {}
|
local effects = {}
|
||||||
|
|
||||||
effects["climate_api:sound"] = {
|
effects["climate_api:sound"] = {
|
||||||
name = "weather_rain"
|
name = "weather_rain",
|
||||||
|
gain = 1.5
|
||||||
}
|
}
|
||||||
|
|
||||||
effects["climate_api:particles"] = {
|
effects["climate_api:particles"] = {
|
||||||
min_pos = {x=-9, y=7, z=-9},
|
min_pos = {x=-9, y=7, z=-9},
|
||||||
max_pos = {x= 9, y=7, z= 9},
|
max_pos = {x= 9, y=7, z= 9},
|
||||||
exptime=0.8,
|
exptime=0.8,
|
||||||
size=1,
|
size=2,
|
||||||
texture = "weather_raindrop.png"
|
texture = "weather_raindrop.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -33,7 +34,7 @@ local function generate_effects(params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
override["climate_api:particles"] = {
|
override["climate_api:particles"] = {
|
||||||
amount = 20 * math.min(intensity, 1.5),
|
amount = 25 * math.min(intensity, 1.5),
|
||||||
falling_speed = 10 / math.min(intensity, 1.3)
|
falling_speed = 10 / math.min(intensity, 1.3)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,18 +11,23 @@ local conditions = {
|
|||||||
local effects = {}
|
local effects = {}
|
||||||
|
|
||||||
effects["climate_api:sound"] = {
|
effects["climate_api:sound"] = {
|
||||||
name = "weather_rain",
|
name = "weather_rain_heavy",
|
||||||
gain = 1
|
gain = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
effects["climate_api:particles"] = {
|
effects["climate_api:particles"] = {
|
||||||
min_pos = {x=-9, y=7, z=-9},
|
min_pos = {x=-9, y=7, z=-9},
|
||||||
max_pos = {x= 9, y=7, z= 9},
|
max_pos = {x= 9, y=7, z= 9},
|
||||||
falling_speed=10,
|
falling_speed=7,
|
||||||
amount=20,
|
amount=17,
|
||||||
exptime=0.8,
|
exptime=0.8,
|
||||||
size=25,
|
min_size=25,
|
||||||
texture="weather_rain.png"
|
max_size=35,
|
||||||
|
textures={
|
||||||
|
"weather_rain.png",
|
||||||
|
"weather_rain.png",
|
||||||
|
"weather_rain_medium.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
climate_api.register_weather(name, conditions, effects)
|
climate_api.register_weather(name, conditions, effects)
|
||||||
|
@ -5,8 +5,7 @@ local conditions = {
|
|||||||
max_height = regional_weather.settings.max_height,
|
max_height = regional_weather.settings.max_height,
|
||||||
min_heat = 50,
|
min_heat = 50,
|
||||||
max_humidity = 25,
|
max_humidity = 25,
|
||||||
min_windspeed = 6,
|
min_windspeed = 4.5,
|
||||||
daylight = 15,
|
|
||||||
has_biome = {
|
has_biome = {
|
||||||
"cold_desert",
|
"cold_desert",
|
||||||
"cold_desert_ocean",
|
"cold_desert_ocean",
|
||||||
@ -24,14 +23,48 @@ effects["climate_api:hud_overlay"] = {
|
|||||||
z_index = -100
|
z_index = -100
|
||||||
}
|
}
|
||||||
|
|
||||||
effects["climate_api:particles"] = {
|
effects["regional_weather:damage"] = {
|
||||||
min_pos = {x=-9, y=-5, z=-9},
|
chance = 3,
|
||||||
max_pos = {x= 9, y= 5, z= 9},
|
value = 1
|
||||||
falling_speed=1,
|
|
||||||
amount=40,
|
|
||||||
exptime=0.8,
|
|
||||||
size=15,
|
|
||||||
texture="weather_sand.png"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
climate_api.register_weather(name, conditions, effects)
|
effects["climate_api:particles"] = {
|
||||||
|
min_pos = {x=-5, y=-4, z=-5},
|
||||||
|
max_pos = {x= 5, y= 4.5, z= 5},
|
||||||
|
falling_speed=1.2,
|
||||||
|
acceleration={x=0,y=0.8,z=0},
|
||||||
|
amount=40,
|
||||||
|
exptime=1.8,
|
||||||
|
size=20,
|
||||||
|
textures={
|
||||||
|
"weather_sandstorm.png",
|
||||||
|
"weather_sandstorm.png^[transformR180"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
effects["climate_api:skybox"] = {
|
||||||
|
cloud_data = {
|
||||||
|
density = 1,
|
||||||
|
color = "#f7e4bfc0",
|
||||||
|
thickness = 40,
|
||||||
|
speed = {x=0,y=0,z=0}
|
||||||
|
},
|
||||||
|
priority = 60
|
||||||
|
}
|
||||||
|
|
||||||
|
local function generate_effects(params)
|
||||||
|
local override = table.copy(effects)
|
||||||
|
override["climate_api:skybox"] = {
|
||||||
|
cloud_data= {
|
||||||
|
height = params.player:get_pos().y
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if params.daylight < 15 then
|
||||||
|
local result = {}
|
||||||
|
result["climate_api:skybox"] = override["climate_api:skybox"]
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
return override
|
||||||
|
end
|
||||||
|
|
||||||
|
climate_api.register_weather(name, conditions, generate_effects)
|
||||||
|
@ -19,7 +19,7 @@ effects["climate_api:particles"] = {
|
|||||||
min_pos = {x=-8, y=3, z=-8},
|
min_pos = {x=-8, y=3, z=-8},
|
||||||
max_pos = {x= 8, y=6, z= 8},
|
max_pos = {x= 8, y=6, z= 8},
|
||||||
exptime=6,
|
exptime=6,
|
||||||
size=12,
|
size=10,
|
||||||
texture="weather_snow.png"
|
texture="weather_snow.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,12 +28,8 @@ local function generate_effects(params)
|
|||||||
local intensity = params.humidity / avg_humidity
|
local intensity = params.humidity / avg_humidity
|
||||||
local override = {}
|
local override = {}
|
||||||
|
|
||||||
override["climate_api:sound"] = {
|
|
||||||
gain = math.min(intensity, 1.2)
|
|
||||||
}
|
|
||||||
|
|
||||||
override["climate_api:particles"] = {
|
override["climate_api:particles"] = {
|
||||||
amount = 8 * math.min(intensity, 1.5),
|
amount = 16 * math.min(intensity, 1.5),
|
||||||
falling_speed = 1 / math.min(intensity, 1.3)
|
falling_speed = 1 / math.min(intensity, 1.3)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
init.lua
@ -20,12 +20,21 @@ regional_weather.settings.snow = get_setting_bool("snow_layers", true)
|
|||||||
regional_weather.settings.puddles = get_setting_bool("puddles", true)
|
regional_weather.settings.puddles = get_setting_bool("puddles", true)
|
||||||
regional_weather.settings.soil = get_setting_bool("soil", true)
|
regional_weather.settings.soil = get_setting_bool("soil", true)
|
||||||
regional_weather.settings.fire = get_setting_bool("fire", true)
|
regional_weather.settings.fire = get_setting_bool("fire", true)
|
||||||
|
regional_weather.settings.ice = get_setting_bool("ice", true)
|
||||||
regional_weather.settings.max_height = get_setting_number("max_height", 120)
|
regional_weather.settings.max_height = get_setting_number("max_height", 120)
|
||||||
regional_weather.settings.min_height = get_setting_number("min_height", -50)
|
regional_weather.settings.min_height = get_setting_number("min_height", -50)
|
||||||
|
|
||||||
|
-- warn about clouds being overriden by MTG weather
|
||||||
|
if climate_mod.settings.skybox
|
||||||
|
and minetest.get_modpath("weather")
|
||||||
|
and get_setting_bool("enable_weather", true) then
|
||||||
|
minetest.log("warning", "[Regional Weather] Disable MTG weather for the best experience")
|
||||||
|
end
|
||||||
|
|
||||||
-- import individual weather types
|
-- import individual weather types
|
||||||
dofile(modpath.."/ca_weathers/ambient.lua")
|
dofile(modpath.."/ca_weathers/ambient.lua")
|
||||||
dofile(modpath.."/ca_weathers/deep_cave.lua")
|
dofile(modpath.."/ca_weathers/deep_cave.lua")
|
||||||
|
--dofile(modpath.."/ca_weathers/fog.lua")
|
||||||
dofile(modpath.."/ca_weathers/hail.lua")
|
dofile(modpath.."/ca_weathers/hail.lua")
|
||||||
dofile(modpath.."/ca_weathers/pollen.lua")
|
dofile(modpath.."/ca_weathers/pollen.lua")
|
||||||
dofile(modpath.."/ca_weathers/rain.lua")
|
dofile(modpath.."/ca_weathers/rain.lua")
|
||||||
@ -44,6 +53,5 @@ dofile(modpath.."/ca_effects/speed_buff.lua")
|
|||||||
dofile(modpath .. "/abms/puddle.lua")
|
dofile(modpath .. "/abms/puddle.lua")
|
||||||
dofile(modpath .. "/abms/snow_cover.lua")
|
dofile(modpath .. "/abms/snow_cover.lua")
|
||||||
dofile(modpath .. "/abms/fire.lua")
|
dofile(modpath .. "/abms/fire.lua")
|
||||||
|
dofile(modpath .. "/abms/ice.lua")
|
||||||
dofile(modpath .. "/abms/soil.lua")
|
dofile(modpath .. "/abms/soil.lua")
|
||||||
|
|
||||||
minetest.log(minetest.LIGHT_MAX)
|
|
2
mod.conf
@ -3,7 +3,7 @@ title = Regional Weather
|
|||||||
author = TestificateMods
|
author = TestificateMods
|
||||||
release = 1
|
release = 1
|
||||||
depends = climate_api
|
depends = climate_api
|
||||||
optional_depends = default, lightning, farming
|
optional_depends = default, lightning, farming, fire
|
||||||
description = """
|
description = """
|
||||||
Not every biome is the same and neither should their weather be.
|
Not every biome is the same and neither should their weather be.
|
||||||
Regional Weather controls it's effects with the local climate in mind.
|
Regional Weather controls it's effects with the local climate in mind.
|
||||||
|
BIN
sounds/weather_rain_heavy.ogg
Normal file
BIN
textures/weather_hud_fog.png
Normal file
After Width: | Height: | Size: 72 B |
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 510 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 402 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 226 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 37 KiB |
BIN
textures/weather_rain_medium.png
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 148 B After Width: | Height: | Size: 184 B |
BIN
textures/weather_sandstorm.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 20 KiB |