mirror of
https://codeberg.org/tenplus1/ambience.git
synced 2024-12-24 01:30:30 +01:00
desert sounds work for both normal and desert sand
This commit is contained in:
parent
e6aa6b19da
commit
c05e9b2da0
@ -199,7 +199,7 @@ ambience.add_set("ice", {
|
|||||||
nodes = {"default:ice"},
|
nodes = {"default:ice"},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Desert sounds play when near 150+ desert sand or stone
|
-- Desert sounds play when near 150+ desert or normal sand
|
||||||
|
|
||||||
ambience.add_set("desert", {
|
ambience.add_set("desert", {
|
||||||
frequency = 20,
|
frequency = 20,
|
||||||
@ -211,16 +211,16 @@ ambience.add_set("desert", {
|
|||||||
sound_check = function(def)
|
sound_check = function(def)
|
||||||
|
|
||||||
local c = (def.totals["default:desert_sand"] or 0) +
|
local c = (def.totals["default:desert_sand"] or 0) +
|
||||||
(def.totals["default:desert_stone"] or 0)
|
(def.totals["default:sand"] or 0)
|
||||||
|
|
||||||
if c > 150 then
|
if c > 150 and pos.y > 10 then
|
||||||
return "desert"
|
return "desert"
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
nodes = {"default:desert_sand", "default:desert_stone"}
|
nodes = {"default:desert_sand", "default:sand"}
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Winds play when player is above 60 Y position and near 150+ snow blocks
|
-- Winds play when player is above 50 Y position and near 150+ snow blocks
|
||||||
|
|
||||||
ambience.add_set("high_up", {
|
ambience.add_set("high_up", {
|
||||||
frequency = 40,
|
frequency = 40,
|
||||||
@ -232,7 +232,7 @@ ambience.add_set("high_up", {
|
|||||||
|
|
||||||
local c = (def.totals["default:snowblock"] or 0)
|
local c = (def.totals["default:snowblock"] or 0)
|
||||||
|
|
||||||
if def.pos.y > 60
|
if def.pos.y > 50
|
||||||
or c > 150 then
|
or c > 150 then
|
||||||
return "high_up"
|
return "high_up"
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user