diff --git a/init.lua b/init.lua index b55d515..8271833 100644 --- a/init.lua +++ b/init.lua @@ -266,7 +266,8 @@ def.on_step = function(self, dtime) if self.visualx >= 2 then self.object:remove() sneeker.boom(pos, self.powered) - core.sound_play("sneeker_explode", {pos=pos, gain=1.5, max_hear_distance=2*64}) + core.sound_play("sneeker_explode", {pos=pos, gain=sneeker.boom_gain, max_hear_distance=2*64}) + return true end end end diff --git a/settings.lua b/settings.lua index ee6f413..979315f 100644 --- a/settings.lua +++ b/settings.lua @@ -3,6 +3,11 @@ local time_min = 60 +--- Loudness of explosion. +-- +-- @setting sneeker.boom_gain +sneeker.boom_gain = tonumber(core.settings:get("sneeker.boom_gain") or 1.5) + --- Determines whether or not a player must be close for spawn to occur. -- -- @setting sneeker.spawn_require_player_nearby diff --git a/settingtypes.txt b/settingtypes.txt index 3f95686..82c886a 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -2,6 +2,11 @@ # Extra debugging messages. enable_debug_mods (Mod debugging) bool false +# Loudness of explosion. +# +# Those with a weak heart might want to turn it down. +sneeker.boom_gain (Boom volume) float 1.5 + # Determines whether or not a player must be close for spawn to occur. sneeker.spawn_require_player_nearby (Require player nearby) bool true