From 39f2da10eeec9b065905f68bb77619286fc6fda2 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 2 Mar 2017 18:18:59 +0100 Subject: [PATCH] Play extinguish sound when rain extinguishes flame --- mods/ENVIRONMENT/weather_pack/rain.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mods/ENVIRONMENT/weather_pack/rain.lua b/mods/ENVIRONMENT/weather_pack/rain.lua index 73c96b1157..2229e750f1 100644 --- a/mods/ENVIRONMENT/weather_pack/rain.lua +++ b/mods/ENVIRONMENT/weather_pack/rain.lua @@ -171,21 +171,22 @@ if weather.reg_weathers.rain == nil then end if weather.allow_abm then --- ABM for extinguish fire + -- ABM for extinguish fire minetest.register_abm({ - nodenames = {"mcl_fire:fire"}, - interval = 4.0, - chance = 2, - action = function(pos, node, active_object_count, active_object_count_wider) - if rain.raining and rain.extinguish_fire then + nodenames = {"mcl_fire:fire"}, + interval = 4.0, + chance = 2, + action = function(pos, node, active_object_count, active_object_count_wider) + if rain.raining and rain.extinguish_fire then if weather.is_outdoor(pos) then minetest.remove_node(pos) + minetest.sound_play("fire_extinguish_flame", {pos = pos, max_hear_distance = 16, gain = 0.15}) end end end -}) + }) --- Slowly fill up cauldrons + -- Slowly fill up cauldrons minetest.register_abm({ nodenames = {"mcl_cauldrons:cauldron", "mcl_cauldrons:cauldron_1", "mcl_cauldrons:cauldron_2"}, interval = 56.0,