From b1546a48dad1985d689848fb1814acfa2578257f Mon Sep 17 00:00:00 2001 From: Chen Marisa <18307183+flleeppyy@users.noreply.github.com> Date: Mon, 30 Sep 2024 05:05:37 -0700 Subject: [PATCH] feat: custom song titles (#3622) --- code/modules/admin/verbs/playsound.dm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index b13363f4545b..4c00bdec7493 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -107,7 +107,8 @@ if (duration > 10 MINUTES) if((tgui_alert(user, "This song is over 10 minutes long. Are you sure you want to play it?", "Length Warning!", list("No", "Yes", "Cancel")) != "Yes")) return - var/res = tgui_alert(user, "Show the title of and link to this song to the players?\n[title]", "Show Info?", list("Yes", "No", "Cancel")) + // MONKESTATION EDIT ORIGINAL: var/res = tgui_alert(user, "Show the title of and link to this song to the players?\n[title]", "Show Info?", list("Yes", "No", "Cancel")) + var/res = tgui_input_list(user, "Show the title of and link to this song to the players?\n[title]", "Show Info?", list("Yes", "No", "Custom Title", "Cancel")) // MONKESTATION EDIT - Custom title switch(res) if("Yes") music_extra_data["title"] = data["title"] @@ -117,6 +118,14 @@ music_extra_data["artist"] = "Song Artist Hidden" music_extra_data["upload_date"] = "Song Upload Date Hidden" music_extra_data["album"] = "Song Album Hidden" + // MONKESTATION EDIT START - Custom title + if("Custom Title") + var/custom_title = tgui_input_text(user, "Enter the title to show to players", "Custom sound info", null) + if (!length(custom_title)) + tgui_alert(user, "No title specified, using default.", "Custom sound info", list("Okay")) + else + music_extra_data["title"] = custom_title + // MONKESTATION EDIT END if("Cancel", null) return var/anon = tgui_alert(user, "Display who played the song?", "Credit Yourself?", list("Yes", "No", "Cancel"))