diff --git a/ambience.lua b/ambience.lua new file mode 100644 index 0000000..a7165df --- /dev/null +++ b/ambience.lua @@ -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 +}) diff --git a/init.lua b/init.lua index c1206a4..38aa68c 100644 --- a/init.lua +++ b/init.lua @@ -165,4 +165,10 @@ else -- or return to where it came from minetest.register_alias("ethereal:bonemeal", "default:dirt") end +-- ambience lite + +if minetest.get_modpath("ambience") then + dofile(path .. "/ambience.lua") +end + print ("[MOD] Ethereal loaded") diff --git a/leaves.lua b/leaves.lua index 30d4826..cc66143 100644 --- a/leaves.lua +++ b/leaves.lua @@ -603,9 +603,9 @@ decay({"ethereal:olive_trunk"}, {"ethereal:olive_leaves", "ethereal:olive"}, 3) decay({"ethereal:mushroom_trunk"}, {"ethereal:mushroom", "ethereal:mushroom_brown", "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 = { {"ethereal:frost_leaves", "331b37", 9}, diff --git a/license.txt b/license.txt index 72e0458..ea1604a 100644 --- a/license.txt +++ b/license.txt @@ -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/ 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 diff --git a/sounds/ethereal_crystal.ogg b/sounds/ethereal_crystal.ogg new file mode 100644 index 0000000..3962fa7 Binary files /dev/null and b/sounds/ethereal_crystal.ogg differ diff --git a/sounds/ethereal_mushroom.ogg b/sounds/ethereal_mushroom.ogg new file mode 100644 index 0000000..6fa86d9 Binary files /dev/null and b/sounds/ethereal_mushroom.ogg differ