Add setting to adjust loudness of explostion

This commit is contained in:
Jordan Irwin 2021-05-08 16:58:10 -07:00
parent 1aff8fee5b
commit 969cac3860
3 changed files with 12 additions and 1 deletions

@ -266,7 +266,8 @@ def.on_step = function(self, dtime)
if self.visualx >= 2 then if self.visualx >= 2 then
self.object:remove() self.object:remove()
sneeker.boom(pos, self.powered) 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 end
end end

@ -3,6 +3,11 @@
local time_min = 60 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. --- Determines whether or not a player must be close for spawn to occur.
-- --
-- @setting sneeker.spawn_require_player_nearby -- @setting sneeker.spawn_require_player_nearby

@ -2,6 +2,11 @@
# Extra debugging messages. # Extra debugging messages.
enable_debug_mods (Mod debugging) bool false 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. # Determines whether or not a player must be close for spawn to occur.
sneeker.spawn_require_player_nearby (Require player nearby) bool true sneeker.spawn_require_player_nearby (Require player nearby) bool true