forked from mtcontrib/regional_weather
Update to new influences, improve rain skybox
This commit is contained in:
parent
497f31918a
commit
e0b8d6d835
@ -12,7 +12,7 @@ climate_api.register_abm({
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_humidity = 55,
|
||||
max_heat = 85,
|
||||
min_light = 15
|
||||
daylight = 15
|
||||
},
|
||||
|
||||
action = function (pos, node, env)
|
||||
|
@ -37,7 +37,7 @@ minetest.register_node(BLOCK_NAME, {
|
||||
crumbly = 3,
|
||||
attached_node = 1,
|
||||
slippery = 1,
|
||||
replaceable_by_snow = 1
|
||||
flora = 1
|
||||
},
|
||||
drop = "",
|
||||
})
|
||||
@ -55,7 +55,7 @@ climate_api.register_abm({
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_humidity = 55,
|
||||
min_heat = 30,
|
||||
min_light = 15
|
||||
daylight = 15
|
||||
},
|
||||
|
||||
pos_override = function(pos)
|
||||
|
@ -6,6 +6,7 @@
|
||||
local BLOCK_PREFIX = "regional_weather:snow_cover_"
|
||||
|
||||
if not minetest.get_modpath("default")
|
||||
or default.node_sound_snow_defaults == nil
|
||||
or not regional_weather.settings.snow then
|
||||
for i = 1,5 do
|
||||
minetest.register_alias(BLOCK_PREFIX .. i, "air")
|
||||
@ -41,6 +42,12 @@ for i = 1,5 do
|
||||
if minetest.get_node(pos).name == "default:dirt_with_grass" then
|
||||
minetest.set_node(pos, {name = "default:dirt_with_snow"})
|
||||
end
|
||||
end,
|
||||
on_destruct = 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
|
||||
})
|
||||
end
|
||||
@ -63,7 +70,7 @@ climate_api.register_abm({
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_humidity = 55,
|
||||
max_heat = 30,
|
||||
min_light = 15
|
||||
daylight = 15
|
||||
},
|
||||
|
||||
pos_override = function(pos)
|
||||
@ -87,7 +94,6 @@ climate_api.register_abm({
|
||||
"group:flora",
|
||||
"group:grass",
|
||||
"group:plant",
|
||||
"group:replaceable_by_snow",
|
||||
"group:regional_weather_snow_cover"
|
||||
},
|
||||
interval = 15,
|
||||
@ -98,7 +104,7 @@ climate_api.register_abm({
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_humidity = 55,
|
||||
max_heat = 30,
|
||||
min_light = 15
|
||||
daylight = 15
|
||||
},
|
||||
|
||||
action = function (pos, node, env)
|
||||
@ -118,9 +124,7 @@ climate_api.register_abm({
|
||||
chance = 10,
|
||||
|
||||
conditions = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_heat = 30
|
||||
min_heat = 30
|
||||
},
|
||||
|
||||
action = function (pos, node, env)
|
||||
|
@ -2,21 +2,37 @@ local name = "regional_weather:ambient"
|
||||
|
||||
local CLOUD_SPEED = 1.8
|
||||
|
||||
local conditions = {
|
||||
min_daylight = 15
|
||||
}
|
||||
local conditions = {}
|
||||
|
||||
local function generate_effects(params)
|
||||
local override = {}
|
||||
local wind = climate_api.environment.get_wind()
|
||||
|
||||
override["climate_api:skybox"] = {
|
||||
cloud_data = {
|
||||
size = climate_api.utility.rangelim(params.humidity / 100, 0.25, 0.98),
|
||||
speed = vector.multiply(wind, CLOUD_SPEED)
|
||||
}
|
||||
local skybox = {}
|
||||
skybox.cloud_data = {
|
||||
size = climate_api.utility.rangelim(params.humidity / 100, 0.25, 0.98),
|
||||
speed = vector.multiply(wind, CLOUD_SPEED),
|
||||
thickness = climate_api.utility.rangelim(params.base_humidity * 0.2, 1, 18)
|
||||
}
|
||||
|
||||
if params.height > -100 and params.humidity > 65 then
|
||||
skybox.sky_data = {
|
||||
type = "regular",
|
||||
--base_color = { r = 106, g = 130, b = 142 },
|
||||
clouds = true,
|
||||
sky_color = {
|
||||
day_sky = "#6a828e",
|
||||
day_horizon = "#5c7a8a",
|
||||
dawn_sky = "#b2b5d7",
|
||||
dawn_horizon = "#b7bce1",
|
||||
night_sky = "#2373e1",
|
||||
night_horizon = "#315d9b"
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
override["climate_api:skybox"] = skybox
|
||||
|
||||
local movement = params.player:get_player_velocity()
|
||||
local movement_direction
|
||||
if (vector.length(movement) < 0.1) then
|
||||
|
@ -1,8 +1,8 @@
|
||||
local name = "regional_weather:deep_cave"
|
||||
|
||||
local conditions = {
|
||||
max_daylight = 14,
|
||||
max_height = -100
|
||||
max_daylight = minetest.LIGHT_MAX,
|
||||
max_height = -100
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
@ -12,7 +12,10 @@ effects["climate_api:skybox"] = {
|
||||
base_color = { r = 0, g = 0, b = 0 },
|
||||
clouds = false
|
||||
},
|
||||
sun_data = { visible = false },
|
||||
sun_data = {
|
||||
visible = false,
|
||||
sunrise_visible = false
|
||||
},
|
||||
moon_data = { visible = false },
|
||||
stars_data = { visible = false }
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ local conditions = {
|
||||
max_heat = 45,
|
||||
min_humidity = 65,
|
||||
min_windspeed = 2.5,
|
||||
min_daylight = 15
|
||||
daylight = 15
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
|
@ -7,7 +7,28 @@ local conditions = {
|
||||
min_humidity = 30,
|
||||
max_humidity = 40,
|
||||
max_windspeed = 2,
|
||||
min_daylight = 15
|
||||
daylight = 15,
|
||||
has_biome = {
|
||||
"default",
|
||||
"deciduous_forest",
|
||||
"deciduous_forest_ocean",
|
||||
"deciduous_forest_shore",
|
||||
"grassland",
|
||||
"grassland_dunes",
|
||||
"grassland_ocean",
|
||||
"snowy_grassland",
|
||||
"snowy_grassland_ocean",
|
||||
"grassy",
|
||||
"grassy_ocean",
|
||||
"grassytwo",
|
||||
"grassytwo_ocean",
|
||||
"mushroom",
|
||||
"mushroom_ocean",
|
||||
"plains",
|
||||
"plains_ocean",
|
||||
"sakura",
|
||||
"sakura_ocean"
|
||||
}
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
|
@ -6,7 +6,7 @@ local conditions = {
|
||||
min_heat = 30,
|
||||
min_humidity = 50,
|
||||
max_humidity = 65,
|
||||
min_daylight = 15
|
||||
daylight = 15
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
|
@ -5,7 +5,7 @@ local conditions = {
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_heat = 40,
|
||||
min_humidity = 65,
|
||||
min_daylight = 15
|
||||
daylight = 15
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
@ -15,14 +15,6 @@ effects["climate_api:sound"] = {
|
||||
gain = 1
|
||||
}
|
||||
|
||||
effects["climate_api:skybox"] = {
|
||||
sky_data = {
|
||||
type = "plain",
|
||||
base_color = {r = 125, g = 142, b = 145},
|
||||
clouds = true
|
||||
}
|
||||
}
|
||||
|
||||
effects["climate_api:particles"] = {
|
||||
min_pos = {x=-9, y=7, z=-9},
|
||||
max_pos = {x= 9, y=7, z= 9},
|
||||
|
@ -6,11 +6,14 @@ local conditions = {
|
||||
min_heat = 50,
|
||||
max_humidity = 25,
|
||||
min_windspeed = 6,
|
||||
min_daylight = 15,
|
||||
daylight = 15,
|
||||
has_biome = {
|
||||
"cold_desert",
|
||||
"cold_desert_ocean",
|
||||
"desert",
|
||||
"desert_ocean",
|
||||
"sandstone_desert",
|
||||
"cold_desert"
|
||||
"sandstone_desert_ocean"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ local conditions = {
|
||||
max_heat = 40,
|
||||
min_humidity = 50,
|
||||
max_humidity = 65,
|
||||
min_daylight = 15
|
||||
daylight = 15
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
|
@ -5,7 +5,7 @@ local conditions = {
|
||||
max_height = regional_weather.settings.max_height,
|
||||
max_heat = 30,
|
||||
min_humidity = 65,
|
||||
min_daylight = 15
|
||||
daylight = 15
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
@ -23,14 +23,6 @@ effects["climate_api:particles"] = {
|
||||
texture="weather_snow.png"
|
||||
}
|
||||
|
||||
effects["climate_api:skybox"] = {
|
||||
sky_data = {
|
||||
type = "plain",
|
||||
base_color = {r=106, g=130, b=142},
|
||||
clouds = true
|
||||
}
|
||||
}
|
||||
|
||||
local function generate_effects(params)
|
||||
local avg_humidity = 55
|
||||
local intensity = params.humidity / avg_humidity
|
||||
|
@ -4,7 +4,7 @@ local conditions = {
|
||||
min_height = regional_weather.settings.min_height,
|
||||
max_height = regional_weather.settings.max_height,
|
||||
min_windspeed = 3,
|
||||
min_daylight = 15
|
||||
daylight = 15
|
||||
}
|
||||
|
||||
local effects = {}
|
||||
|
4
init.lua
4
init.lua
@ -44,4 +44,6 @@ dofile(modpath.."/ca_effects/speed_buff.lua")
|
||||
dofile(modpath .. "/abms/puddle.lua")
|
||||
dofile(modpath .. "/abms/snow_cover.lua")
|
||||
dofile(modpath .. "/abms/fire.lua")
|
||||
dofile(modpath .. "/abms/soil.lua")
|
||||
dofile(modpath .. "/abms/soil.lua")
|
||||
|
||||
minetest.log(minetest.LIGHT_MAX)
|
Loading…
Reference in New Issue
Block a user