From 21776cc3a26a20708d326454ac9cfd97634b39f7 Mon Sep 17 00:00:00 2001 From: Jackriip <97582790+Jackriip@users.noreply.github.com> Date: Mon, 16 Nov 2026 14:10:08 -0800 Subject: [PATCH] Stop the lobby replaying last round's song --- code/controllers/subsystem/ticker.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index a46c3aa654a..a587c73b883 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -106,9 +106,13 @@ SUBSYSTEM_DEF(ticker) continue music += S - var/old_login_music = trim(file2text("data/last_round_lobby_music.txt")) + // VOIDCREW EDIT CHANGE START - the file holds a full path (and old files hold several lines), but music holds bare filenames + var/list/old_login_lines = splittext(trim(file2text("data/last_round_lobby_music.txt")), "\n") + var/old_login_music = trim(old_login_lines[length(old_login_lines)]) + var/list/old_login_parts = splittext(old_login_music, "/") if(length(music) > 1) - music -= old_login_music + music -= old_login_parts[length(old_login_parts)] + // VOIDCREW EDIT CHANGE END for(var/S in music) var/list/L = splittext(S,".") @@ -866,6 +870,7 @@ SUBSYSTEM_DEF(ticker) if(pref_volume > 0) SEND_SOUND(M.client, sound(round_end_sound, volume = pref_volume)) + fdel("data/last_round_lobby_music.txt") // VOIDCREW EDIT ADDITION - text2file appends; keep only this round's song text2file(login_music, "data/last_round_lobby_music.txt") /datum/controller/subsystem/ticker/proc/choose_round_end_song()