Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,".")
Expand Down Expand Up @@ -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()
Expand Down
Loading