mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-22 17:02:23 +01:00
Shields: Add option to disable sound effects
This commit is contained in:
parent
8e8c79aca2
commit
9f49060ae6
@ -7,3 +7,10 @@ Depends: 3d_armor
|
||||
|
||||
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.
|
||||
|
||||
Shields Configuration
|
||||
---------------------
|
||||
|
||||
Override the following default settings by adding them to your minetest.conf file.
|
||||
|
||||
shields_disable_sounds = false
|
||||
|
@ -8,9 +8,11 @@ if minetest.global_exists("intllib") then
|
||||
S = intllib.Getter()
|
||||
end
|
||||
end
|
||||
|
||||
local disable_sounds = minetest.settings:get_bool("shields_disable_sounds")
|
||||
local use_moreores = minetest.get_modpath("moreores")
|
||||
local function play_sound_effect(player, name)
|
||||
if player then
|
||||
if not disable_sounds and player then
|
||||
local pos = player:getpos()
|
||||
if pos then
|
||||
minetest.sound_play(name, {
|
||||
|
Loading…
Reference in New Issue
Block a user