mirror of
https://codeberg.org/tenplus1/ambience.git
synced 2024-11-14 14:30:27 +01:00
.13 added song and flowing water
added mass affect song
This commit is contained in:
parent
7ea19d8aa4
commit
71f241f848
BIN
ambience.zip
BIN
ambience.zip
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
--------------------------------------------------------------------------------------------------------
|
||||
--Ambiance Configuration for version .12
|
||||
--Ambiance Configuration for version .13
|
||||
|
||||
local max_frequency_all = 1000 --the larger you make this number the lest frequent ALL sounds will happen recommended values between 100-2000.
|
||||
|
||||
|
@ -95,6 +95,12 @@ local water_frequent = {
|
|||
{name="scuba1tubulentbubbles", length=10.5, gain=water_frequent_volume}
|
||||
}
|
||||
|
||||
local flowing_water = {
|
||||
handler = {},
|
||||
frequency = 1000,
|
||||
{name="small_waterfall", length=14},
|
||||
}
|
||||
|
||||
local play_music = minetest.setting_getbool("music") or false
|
||||
local music = {
|
||||
handler = {},
|
||||
|
@ -103,6 +109,7 @@ local music = {
|
|||
{name="echos", length=2*60+26, gain=music_volume},
|
||||
{name="FoamOfTheSea", length=1*60+50, gain=music_volume},
|
||||
{name="eastern_feeling", length=3*60+51, gain=music_volume},
|
||||
{name="Mass_Effect_Uncharted_Worlds", length=2*60+29, gain=music_volume},
|
||||
{name="dark_ambiance", length=44, gain=music_volume}
|
||||
}
|
||||
|
||||
|
@ -110,6 +117,23 @@ local is_daytime = function()
|
|||
return (minetest.env:get_timeofday() > 0.2 and minetest.env:get_timeofday() < 0.8)
|
||||
end
|
||||
|
||||
local nodes_in_range = function(pos, search_distance, node_name)
|
||||
local search_p = {x=0, y=0, z=0}
|
||||
local nodes_found = 0
|
||||
for p_x=(pos.x-search_distance), (pos.x+search_distance) do
|
||||
for p_y=(pos.y-search_distance), (pos.y+search_distance) do
|
||||
for p_z=(pos.z-search_distance), (pos.z+search_distance) do
|
||||
local search_n = minetest.env:get_node({x=p_x, y=p_y, z=p_z})
|
||||
if search_n.name == node_name then
|
||||
nodes_found = nodes_found + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return nodes_found
|
||||
--minetest.chat_send_all("Range: " .. tostring(search_distance) .. " | Found (" .. node_name .. ": " .. nodes_found .. ")")
|
||||
end
|
||||
|
||||
local get_ambience = function(player)
|
||||
local pos = player:getpos()
|
||||
pos.y = pos.y+1.0
|
||||
|
@ -121,6 +145,13 @@ local get_ambience = function(player)
|
|||
return {water=water, water_frequent=water_frequent}
|
||||
end
|
||||
end
|
||||
if nodes_in_range(pos, 5, "default:water_flowing")>5 then
|
||||
if music then
|
||||
return {flowing_water=flowing_water, music=music}
|
||||
else
|
||||
return {flowing_water=flowing_water}
|
||||
end
|
||||
end
|
||||
if player:getpos().y < 0 then
|
||||
if music then
|
||||
return {cave=cave, cave_frequent=cave_frequent, music=music}
|
||||
|
@ -239,6 +270,16 @@ local stop_sound = function(still_playing, player)
|
|||
list.handler[player_name] = nil
|
||||
end
|
||||
end
|
||||
if still_playing.flowing_water == nil then
|
||||
local list = flowing_water
|
||||
if list.handler[player_name] ~= nil then
|
||||
if list.on_stop ~= nil then
|
||||
minetest.sound_play(list.on_stop, {to_player=player:get_player_name()})
|
||||
end
|
||||
minetest.sound_stop(list.handler[player_name])
|
||||
list.handler[player_name] = nil
|
||||
end
|
||||
end
|
||||
if still_playing.water == nil then
|
||||
local list = water
|
||||
if list.handler[player_name] ~= nil then
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
--------------Music Lic:
|
||||
- Jordach:
|
||||
Jordach:
|
||||
--mtest
|
||||
--dark_ambiance
|
||||
--eastern_feeling
|
||||
|
@ -11,8 +11,11 @@ The included sounds are http://creativecommons.org/licenses/by-nc-sa/3.0/
|
|||
--echos http://soundcloud.com/jordan-craige/echos-1
|
||||
Creative Commons Attribution license (reuse allowed) Attribution 3.0 Unported (CC BY 3.0)
|
||||
|
||||
xi-intersection:
|
||||
http://soundcloud.com/xi-intersection/mass-effect-uncharted-worlds Creative Commons License
|
||||
--not used:
|
||||
http://soundcloud.com/xi-intersection/donkey-kong-country-2-flight
|
||||
http://soundcloud.com/kogyo/kogyo-skalar-m1
|
||||
|
||||
-----------Sound Lic:
|
||||
--Nightime Sound, Recorded by Mike Koenig, License: Attribution 3.0 http://soundbible.com/951-Nightime.html
|
||||
|
@ -56,6 +59,12 @@ ComboWind uses:
|
|||
|
||||
--Splash: Attribution 3.0 | Recorded by BlastwaveFx.com, http://soundbible.com/546-Fish-Splashing.html
|
||||
|
||||
--small_waterfall Attribution License, volivieri, http://www.freesound.org/people/volivieri/sounds/38390/
|
||||
|
||||
--Lake_Waves_2*, Attribution License, Benboncan, http://www.freesound.org/people/Benboncan/sounds/67884/
|
||||
|
||||
--water_swimming_splashing*, Attribution Noncommercial License, Robinhood76, http://www.freesound.org/people/Robinhood76/sounds/79657/
|
||||
|
||||
----------------Not used yet:
|
||||
--natural night sounds in Boquete.wav, Attribution License, laurent, http://www.freesound.org/people/laurent/sounds/15851/
|
||||
http://www.freesound.org/people/Dynamicell/sounds/17553/
|
||||
|
|
Binary file not shown.
Binary file not shown.
BIN
ambience/sounds/small_waterfall.ogg
Normal file
BIN
ambience/sounds/small_waterfall.ogg
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
Loading…
Reference in New Issue
Block a user