Shields: Add option to disable sound effects

This commit is contained in:
stujones11 2018-02-18 20:35:49 +00:00
parent 4baed2ca22
commit c812e0ac56
2 changed files with 9 additions and 1 deletions

View File

@ -7,3 +7,10 @@ Depends: 3d_armor
Originally a part of 3d_armor, shields have been re-included as an optional extra. Originally a part of 3d_armor, shields have been re-included as an optional extra.
If you do not what shields then simply remove the shields folder from the modpack. If you do not what shields then simply remove the shields folder from the modpack.
Shields Configuration
---------------------
Override the following default settings by adding them to your minetest.conf file.
shields_disable_sounds = false

View File

@ -1,9 +1,10 @@
-- support for i18n -- support for i18n
local S = armor_i18n.gettext local S = armor_i18n.gettext
local disable_sounds = minetest.settings:get_bool("shields_disable_sounds")
local use_moreores = minetest.get_modpath("moreores") local use_moreores = minetest.get_modpath("moreores")
local function play_sound_effect(player, name) local function play_sound_effect(player, name)
if player then if not disable_sounds and player then
local pos = player:getpos() local pos = player:getpos()
if pos then if pos then
minetest.sound_play({ minetest.sound_play({