Fix April Fools and Roundend title music (#89741)

## About The Pull Request

1. April Fools set the lobby music, but order of operations says
holidays might be initialized before ticker. So we need to ensure it
won't get overridden.
2. Lobby music pref was changed from a toggle to a number, but the proc
already passed the number as an argument, so the arg did nothing. Now
it'll (properly) play at half volume during end-of-round.
3. When using default repo lobby music, it will not play the same music
after two rounds (as it does with configured lobby music)

## Changelog

🆑 Melbert
fix: Roundend title music will play at half volume again
fix: April Fools lobby music will correctly always be clown music
fix: Lobby Music will repeat across sequential rounds less often
/🆑
This commit is contained in:
MrMelbert
2025-03-12 16:53:44 -04:00
committed by Roxy
parent c1a4b2ac42
commit 1907104d6f
4 changed files with 19 additions and 10 deletions
+13 -4
View File
@@ -112,7 +112,7 @@ SUBSYSTEM_DEF(ticker)
music += S
var/old_login_music = trim(file2text("data/last_round_lobby_music.txt"))
if(music.len > 1)
if(length(music) > 1)
music -= old_login_music
for(var/S in music)
@@ -125,10 +125,11 @@ SUBSYSTEM_DEF(ticker)
if(!length(music))
music = world.file2list(ROUND_START_MUSIC_LIST, "\n")
login_music = pick(music)
if(length(music) > 1)
music -= old_login_music
set_lobby_music(pick(music))
else
login_music = "[global.config.directory]/title_music/sounds/[pick(music)]"
set_lobby_music("[global.config.directory]/title_music/sounds/[pick(music)]")
if(!GLOB.syndicate_code_phrase)
GLOB.syndicate_code_phrase = generate_code_phrase(return_list=TRUE)
@@ -793,5 +794,13 @@ SUBSYSTEM_DEF(ticker)
if(possible_themes.len)
return "[global.config.directory]/reboot_themes/[pick(possible_themes)]"
/// Updates the lobby music
/// Does not update if override is FALSE and login_music is already set
/datum/controller/subsystem/ticker/proc/set_lobby_music(new_music, override = FALSE)
if(!override && login_music)
return
login_music = new_music
#undef ROUND_START_MUSIC_LIST
#undef SS_TICKER_TRAIT