2019-09-02 11:34:14 -04:00
|
|
|
-- LUALOCALS < ---------------------------------------------------------
|
|
|
|
local minetest, nodecore
|
|
|
|
= minetest, nodecore
|
|
|
|
-- LUALOCALS > ---------------------------------------------------------
|
|
|
|
|
|
|
|
nodecore.register_ambiance({
|
|
|
|
label = "Tree Leaves Ambiance",
|
|
|
|
nodenames = {"nc_tree:leaves"},
|
|
|
|
neigbors = {"air"},
|
|
|
|
interval = 1,
|
|
|
|
chance = 100,
|
|
|
|
sound_name = "nc_tree_breeze",
|
|
|
|
check = function(pos)
|
|
|
|
pos.y = pos.y + 1
|
|
|
|
if pos.y <= 0 then return end
|
|
|
|
return minetest.get_node(pos).name == "air"
|
2020-02-22 16:55:42 -05:00
|
|
|
and nodecore.is_full_sun(pos)
|
2019-12-01 11:08:12 -05:00
|
|
|
and {gain = nodecore.windiness(pos.y) / 20}
|
2019-09-02 11:34:14 -04:00
|
|
|
end
|
|
|
|
})
|