Give an option for players to disable the in game music
parent
899cfd5157
commit
09a7348256
|
@ -1,6 +1,8 @@
|
||||||
local modname = minetest.get_current_modname()
|
local modname = minetest.get_current_modname()
|
||||||
local modpath = minetest.get_modpath(modname)
|
local modpath = minetest.get_modpath(modname)
|
||||||
|
|
||||||
|
local music_disabled = minetest.settings:get_bool("mcl_music_disable", false)
|
||||||
|
|
||||||
local pianowtune = "diminixed-pianowtune01"
|
local pianowtune = "diminixed-pianowtune01"
|
||||||
local end_tune = "diminixed-ambientwip"
|
local end_tune = "diminixed-ambientwip"
|
||||||
local nether_tune = "horizonchris96-traitor"
|
local nether_tune = "horizonchris96-traitor"
|
||||||
|
@ -99,6 +101,8 @@ local function play()
|
||||||
minetest.after(7, play)
|
minetest.after(7, play)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not music_disabled then
|
||||||
|
minetest.log("action", "[mcl_music] Music is activated")
|
||||||
minetest.after(15, play)
|
minetest.after(15, play)
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player, last_login)
|
minetest.register_on_joinplayer(function(player, last_login)
|
||||||
|
@ -110,4 +114,6 @@ minetest.register_on_respawnplayer(function(player)
|
||||||
local player_name = player:get_player_name()
|
local player_name = player:get_player_name()
|
||||||
stop_music_for_listener_name(player_name)
|
stop_music_for_listener_name(player_name)
|
||||||
end)
|
end)
|
||||||
|
else
|
||||||
|
minetest.log("action", "[mcl_music] Music is deactivated")
|
||||||
|
end
|
|
@ -139,6 +139,9 @@ mcl_mob_active_range (Active mob range) int 48 0 256
|
||||||
# Enable flame sound.
|
# Enable flame sound.
|
||||||
flame_sound (Flame sound) bool true
|
flame_sound (Flame sound) bool true
|
||||||
|
|
||||||
|
# Disable the in game music.
|
||||||
|
mcl_music_disable (Disable in game music) bool false
|
||||||
|
|
||||||
[Graphics]
|
[Graphics]
|
||||||
# How many vertical animation frames the fire texture (fire_basic_flame_animated.png) has.
|
# How many vertical animation frames the fire texture (fire_basic_flame_animated.png) has.
|
||||||
# This may vary depending on the texture pack you use.
|
# This may vary depending on the texture pack you use.
|
||||||
|
|
Loading…
Reference in New Issue