forked from Mineclonia/Mineclonia
Play extinguish sound when rain extinguishes flame
This commit is contained in:
parent
7dce9bf429
commit
39f2da10ee
|
@ -171,21 +171,22 @@ if weather.reg_weathers.rain == nil then
|
||||||
end
|
end
|
||||||
|
|
||||||
if weather.allow_abm then
|
if weather.allow_abm then
|
||||||
-- ABM for extinguish fire
|
-- ABM for extinguish fire
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"mcl_fire:fire"},
|
nodenames = {"mcl_fire:fire"},
|
||||||
interval = 4.0,
|
interval = 4.0,
|
||||||
chance = 2,
|
chance = 2,
|
||||||
action = function(pos, node, active_object_count, active_object_count_wider)
|
action = function(pos, node, active_object_count, active_object_count_wider)
|
||||||
if rain.raining and rain.extinguish_fire then
|
if rain.raining and rain.extinguish_fire then
|
||||||
if weather.is_outdoor(pos) then
|
if weather.is_outdoor(pos) then
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
|
minetest.sound_play("fire_extinguish_flame", {pos = pos, max_hear_distance = 16, gain = 0.15})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Slowly fill up cauldrons
|
-- Slowly fill up cauldrons
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"mcl_cauldrons:cauldron", "mcl_cauldrons:cauldron_1", "mcl_cauldrons:cauldron_2"},
|
nodenames = {"mcl_cauldrons:cauldron", "mcl_cauldrons:cauldron_1", "mcl_cauldrons:cauldron_2"},
|
||||||
interval = 56.0,
|
interval = 56.0,
|
||||||
|
|
Loading…
Reference in New Issue