add some ambience sounds

This commit is contained in:
tenplus1 2024-09-09 12:08:56 +01:00
parent 1e7e40fd0f
commit 73549aea9e
6 changed files with 59 additions and 2 deletions

45
ambience.lua Normal file
View File

@ -0,0 +1,45 @@
-- mushroom biome
ambience.add_set("ethereal_mushroom", {
frequency = 40,
sounds = {
{name = "ethereal_mushroom", length = 1.3, ephemeral = true},
{name = "ethereal_mushroom", length = 1.3, pitch = 0.9, ephemeral = true},
{name = "ethereal_mushroom", length = 1.3, pitch = 1.2, ephemeral = true},
},
nodes = ({"ethereal:mushroom_trunk"}),
sound_check = function(def)
local c = (def.totals["ethereal:mushroom_trunk"] or 0)
if c > 30 then return "ethereal_mushroom" end
end
})
-- frost biome
ambience.add_set("ethereal_crystal", {
frequency = 50,
sounds = {
{name = "ethereal_crystal", length = 2.3, gain = 2.0, ephemeral = true},
{name = "ethereal_crystal", length = 2.3, gain = 2.0, pitch = 0.9, ephemeral = true},
{name = "ethereal_crystal", length = 2.3, gain = 2.0, pitch = 1.1, ephemeral = true},
},
nodes = ({"ethereal:crystal_spike", "ethereal:crystal_dirt"}),
sound_check = function(def)
local c = (def.totals["ethereal:crystal_spike"] or 0)
local d = (def.totals["ethereal:crystal_dirt"] or 0)
if c > 0 and d > 70 then return "ethereal_crystal" end
end
})

View File

@ -165,4 +165,10 @@ else -- or return to where it came from
minetest.register_alias("ethereal:bonemeal", "default:dirt") minetest.register_alias("ethereal:bonemeal", "default:dirt")
end end
-- ambience lite
if minetest.get_modpath("ambience") then
dofile(path .. "/ambience.lua")
end
print ("[MOD] Ethereal loaded") print ("[MOD] Ethereal loaded")

View File

@ -603,9 +603,9 @@ decay({"ethereal:olive_trunk"}, {"ethereal:olive_leaves", "ethereal:olive"}, 3)
decay({"ethereal:mushroom_trunk"}, {"ethereal:mushroom", "ethereal:mushroom_brown", decay({"ethereal:mushroom_trunk"}, {"ethereal:mushroom", "ethereal:mushroom_brown",
"ethereal:mushroom_pore", "ethereal:lightstring"}, 4) "ethereal:mushroom_pore", "ethereal:lightstring"}, 4)
if minetest.settings:get_bool("ethereal.leaf_particles") ~= false then -- falling leaf particles
-- falling leaf effect if minetest.settings:get_bool("ethereal.leaf_particles") ~= false then
local leaf_list = { local leaf_list = {
{"ethereal:frost_leaves", "331b37", 9}, {"ethereal:frost_leaves", "331b37", 9},

View File

@ -214,3 +214,9 @@ Created by XSSheep (CC BY-SA 4.0 - https://minecraft.curseforge.com/projects/pix
Sound by I_q (Attribution 3.0) https://freesound.org/people/l_q/sounds/440956/ Sound by I_q (Attribution 3.0) https://freesound.org/people/l_q/sounds/440956/
ethereal_casting_rod.ogg ethereal_casting_rod.ogg
Sounds by eZZin (CC0) https://freesound.org/people/eZZin/sounds/667122/
ethereal_mushroom.ogg
Sound by Kostrava (CC0) https://freesound.org/people/Kostrava/sounds/333988/
ethereal_crystal.ogg

BIN
sounds/ethereal_crystal.ogg Normal file

Binary file not shown.

Binary file not shown.