Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Play internet sound - Custom track titles #3622

Merged
merged 1 commit into from
Sep 30, 2024
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
11 changes: 10 additions & 1 deletion code/modules/admin/verbs/playsound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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"))
Expand Down
Loading