diff --git a/SQL/migrate-2023/V016__lobby_music_volume.sql b/SQL/migrate-2023/V016__lobby_music_volume.sql new file mode 100644 index 00000000000..e83176939bf --- /dev/null +++ b/SQL/migrate-2023/V016__lobby_music_volume.sql @@ -0,0 +1 @@ +ALTER TABLE `ss13_player_preferences` ADD COLUMN `lobby_music_vol` INT(11) NOT NULL DEFAULT 85 AFTER `toggles_secondary`; diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index fd07b91783e..dda73bc7f0b 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -32,7 +32,7 @@ #define SOUND_ADMINHELP 0x1 #define SOUND_MIDI 0x2 // 0x4 is free. -#define SOUND_LOBBY 0x8 +// 0x8 is free. #define CHAT_OOC 0x10 #define CHAT_DEAD 0x20 #define CHAT_GHOSTEARS 0x40 @@ -57,7 +57,7 @@ #define ACCENT_TAG_TEXT BITFLAG(8) #define CLIENT_PREFERENCE_HIDE_MENU BITFLAG(9) -#define TOGGLES_DEFAULT (SOUND_ADMINHELP | SOUND_MIDI | SOUND_LOBBY | CHAT_OOC | CHAT_DEAD | CHAT_GHOSTEARS | CHAT_GHOSTSIGHT | CHAT_PRAYER | CHAT_RADIO | CHAT_ATTACKLOGS | CHAT_LOOC | CHAT_GHOSTLOOC) +#define TOGGLES_DEFAULT (SOUND_ADMINHELP | SOUND_MIDI | CHAT_OOC | CHAT_DEAD | CHAT_GHOSTEARS | CHAT_GHOSTSIGHT | CHAT_PRAYER | CHAT_RADIO | CHAT_ATTACKLOGS | CHAT_LOOC | CHAT_GHOSTLOOC) // ASFX and SFX Toggles // (ASFX = Ambient Sound Effects; SFX = Sound Effects) diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm index 4c9d2758d33..35fa3f1bd35 100644 --- a/code/controllers/subsystems/ticker.dm +++ b/code/controllers/subsystems/ticker.dm @@ -27,7 +27,7 @@ var/datum/controller/subsystem/ticker/SSticker var/datum/game_mode/mode = null var/post_game = 0 - var/login_music // music played in pregame lobby + var/list/login_music // music played in pregame lobby var/list/datum/mind/minds = list()//The people in the game. Used for objective tracking. @@ -53,11 +53,11 @@ var/datum/controller/subsystem/ticker/SSticker var/atom/movable/screen/cinematic = null var/list/default_lobby_tracks = list( - 'sound/music/lobby/space.ogg', - 'sound/music/lobby/traitor.ogg', - 'sound/music/lobby/title2.ogg', - 'sound/music/lobby/title3mk2.ogg', - 'sound/music/lobby/clouds.s3m' + 'sound/music/lobby/yuki_satellites.xm', + 'sound/music/lobby/snow.ogg', + 'sound/music/lobby/saturn.ogg', + 'sound/music/lobby/kaaistoep.ogg', + 'sound/music/lobby/saturn.ogg' ) var/lobby_ready = FALSE @@ -436,9 +436,9 @@ var/datum/controller/subsystem/ticker/SSticker sleep(1) // Sleep so the MC has a chance to update its init time. if(!login_music) if(SSatlas.current_sector && SSatlas.current_sector.lobby_tracks) - login_music = pick(SSatlas.current_sector.lobby_tracks) + login_music = SSatlas.current_sector.lobby_tracks else - login_music = pick(default_lobby_tracks) + login_music = default_lobby_tracks if (is_revote) pregame_timeleft = LOBBY_TIME diff --git a/code/game/machinery/jukebox.dm b/code/game/machinery/jukebox.dm index d6272fb205a..7cd4dcece6a 100644 --- a/code/game/machinery/jukebox.dm +++ b/code/game/machinery/jukebox.dm @@ -24,16 +24,16 @@ var/datum/track/current_track var/list/datum/track/tracks = list( new/datum/track("Beyond", 'sound/music/ambispace.ogg'), - new/datum/track("Clouds of Fire", 'sound/music/lobby/clouds.s3m'), - new/datum/track("D`Bert", 'sound/music/lobby/title2.ogg'), - new/datum/track("Uplift", 'sound/music/lobby/title3mk2.ogg'), + new/datum/track("Clouds of Fire", 'sound/music/clouds.s3m'), + new/datum/track("D`Bert", 'sound/music/title2.ogg'), + new/datum/track("Uplift", 'sound/music/title3.ogg'), + new/datum/track("Uplift II", 'sound/music/title3mk2.ogg'), new/datum/track("D`Fort", 'sound/music/song_game.ogg'), new/datum/track("Floating", 'sound/music/main.ogg'), - new/datum/track("Endless Space", 'sound/music/lobby/space.ogg'), + new/datum/track("Endless Space", 'sound/music/space.ogg'), new/datum/track("Scratch", 'sound/music/title1.ogg'), - new/datum/track("Suspenseful", 'sound/music/lobby/traitor.ogg'), - new/datum/track("Thunderdome", 'sound/music/THUNDERDOME.ogg'), - new/datum/track("Velvet Rose", 'sound/music/velvet_rose.ogg') + new/datum/track("Suspenseful", 'sound/music/traitor.ogg'), + new/datum/track("Thunderdome", 'sound/music/THUNDERDOME.ogg') ) diff --git a/code/game/sound.dm b/code/game/sound.dm index 6c681eb277f..813c63b10dd 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -233,12 +233,14 @@ S.status = SOUND_UPDATE SEND_SOUND(src, S) -/client/proc/playtitlemusic(vol = 85) +/client/proc/playtitlemusic() set waitfor = FALSE UNTIL(SSticker.login_music) //wait for SSticker init to set the login music + SEND_SOUND(src, sound(null, repeat = 0, wait = 0, volume = prefs.lobby_music_vol, channel = CHANNEL_LOBBYMUSIC)) - if(prefs.toggles & SOUND_LOBBY) - SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = vol, channel = CHANNEL_LOBBYMUSIC)) // MAD JAMS + if(prefs.lobby_music_vol) + for(var/lobby_music in SSticker.login_music) + SEND_SOUND(src, sound(lobby_music, repeat = 0, wait = TRUE, volume = prefs.lobby_music_vol, channel = CHANNEL_LOBBYMUSIC)) // MAD JAMS /proc/get_rand_frequency() return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs. diff --git a/code/modules/client/preference_setup/global/02_settings.dm b/code/modules/client/preference_setup/global/02_settings.dm index c8f0a269561..f568f7590a9 100644 --- a/code/modules/client/preference_setup/global/02_settings.dm +++ b/code/modules/client/preference_setup/global/02_settings.dm @@ -8,6 +8,7 @@ S["toggles"] >> pref.toggles S["sfx_toggles"] >> pref.sfx_toggles S["toggles_secondary"] >> pref.toggles_secondary + S["lobby_music_vol"] >> pref.lobby_music_vol /datum/category_item/player_setup_item/player_global/settings/save_preferences(var/savefile/S) S["lastchangelog"] << pref.lastchangelog @@ -15,6 +16,7 @@ S["toggles"] << pref.toggles S["sfx_toggles"] << pref.sfx_toggles S["toggles_secondary"] << pref.toggles_secondary + S["lobby_music_vol"] << pref.lobby_music_vol /datum/category_item/player_setup_item/player_global/settings/gather_load_query() return list( @@ -24,7 +26,8 @@ "current_character", "toggles", "sfx_toggles", - "toggles_secondary" + "toggles_secondary", + "lobby_music_vol" ), "args" = list("ckey") ) @@ -42,6 +45,7 @@ "sfx_toggles", "ckey" = 1, "toggles_secondary", + "lobby_music_vol", ) ) @@ -52,7 +56,8 @@ "current_character" = pref.current_character, "toggles" = pref.toggles, "sfx_toggles" = pref.sfx_toggles, - "toggles_secondary" = pref.toggles_secondary + "toggles_secondary" = pref.toggles_secondary, + "lobby_music_vol" = pref.lobby_music_vol ) /datum/category_item/player_setup_item/player_global/settings/sanitize_preferences(var/sql_load = 0) @@ -65,11 +70,12 @@ pref.toggles = sanitize_integer(text2num(pref.toggles), 0, BITFIELDMAX, initial(pref.toggles)) pref.sfx_toggles = sanitize_integer(text2num(pref.sfx_toggles), 0, BITFIELDMAX, initial(pref.toggles)) pref.toggles_secondary = sanitize_integer(text2num(pref.toggles_secondary), 0, BITFIELDMAX, initial(pref.toggles_secondary)) + pref.lobby_music_vol = sanitize_integer(text2num(pref.lobby_music_vol), 0, BITFIELDMAX, initial(pref.lobby_music_vol)) /datum/category_item/player_setup_item/player_global/settings/content(mob/user) var/list/dat = list( "Play admin midis: [(pref.toggles & SOUND_MIDI) ? "Yes" : "No"]
", - "Play lobby music: [(pref.toggles & SOUND_LOBBY) ? "Yes" : "No"]
", + "Lobby music volume: [(pref.lobby_music_vol)]
", "Ghost ears: [(pref.toggles & CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
", "Ghost sight: [(pref.toggles & CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
", "Ghost radio: [(pref.toggles & CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
", @@ -87,11 +93,13 @@ if(href_list["toggle"]) var/toggle_flag = text2num(href_list["toggle"]) pref.toggles ^= toggle_flag - if(toggle_flag == SOUND_LOBBY && isnewplayer(user)) - if(pref.toggles & SOUND_LOBBY) - user << sound(SSticker.login_music, repeat = 0, wait = 0, volume = 85, channel = 1) - else - user << sound(null, repeat = 0, wait = 0, volume = 85, channel = 1) + return TOPIC_REFRESH + + if(href_list["select_volume"]) + var/lobby_music_vol_new = tgui_input_number(src, "Choose lobby music volume, 0 to mute", "Lobby Music Volume", pref.lobby_music_vol, 100, 0, 0, TRUE) + if(isnull(lobby_music_vol_new)) + return + pref.lobby_music_vol = lobby_music_vol_new return TOPIC_REFRESH if(href_list["paratoggle"]) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index d4ccb7c91cf..d62cb434e1b 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -33,6 +33,7 @@ GLOBAL_LIST_EMPTY_TYPED(preferences_datums, /datum/preferences) var/tgui_inputs_swapped = FALSE var/tgui_say_light_mode = FALSE var/ui_scale = TRUE + var/lobby_music_vol = 85 //Style for popup tooltips var/tooltip_style = "Midnight" diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index 2308f7d1008..98b03d0af5c 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -71,19 +71,23 @@ feedback_add_details("admin_verb","TP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/verb/toggletitlemusic() - set name = "Hear/Silence LobbyMusic" + set name = "Lobby Music Volume" set category = "Preferences.Sound" - set desc = "Toggles hearing the GameLobby music" - prefs.toggles ^= SOUND_LOBBY - prefs.save_preferences() - if(prefs.toggles & SOUND_LOBBY) + set desc = "Adjusts the Game Lobby music volume" + + var/lobby_music_vol_new = tgui_input_number(src, "Choose lobby music volume, 0 to mute", "Lobby Music Volume", prefs.lobby_music_vol, 100, 0, 0, TRUE) + if(isnull(lobby_music_vol_new)) + return + if(!prefs.lobby_music_vol && lobby_music_vol_new) to_chat(src, "You will now hear music in the game lobby.") - if(istype(mob, /mob/abstract/new_player)) - playtitlemusic() - else + prefs.lobby_music_vol = lobby_music_vol_new + if(!prefs.lobby_music_vol) to_chat(src, "You will no longer hear music in the game lobby.") - if(istype(mob, /mob/abstract/new_player)) - src << sound(null, repeat = 0, wait = 0, volume = 85, channel = CHANNEL_LOBBYMUSIC) // stop the jamsz) + prefs.save_preferences() + + if(istype(mob, /mob/abstract/new_player)) + playtitlemusic() + feedback_add_details("admin_verb","TLobby") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/verb/togglemidis() diff --git a/html/changelogs/wezzy_new_lobby_music.yml b/html/changelogs/wezzy_new_lobby_music.yml new file mode 100644 index 00000000000..eb1207a14e4 --- /dev/null +++ b/html/changelogs/wezzy_new_lobby_music.yml @@ -0,0 +1,60 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: Wowzewow (Wezzy) + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Adds new lobby music. Updates the lobby music preference to be able to adjust the volume." + - rscadd: "Added the original Title3 song." + - rscdel: "Removed Velvet Rose song." diff --git a/maps/sccv_horizon/code/sccv_horizon_holodeck.dm b/maps/sccv_horizon/code/sccv_horizon_holodeck.dm index f44870068e2..d25046f9bae 100644 --- a/maps/sccv_horizon/code/sccv_horizon_holodeck.dm +++ b/maps/sccv_horizon/code/sccv_horizon_holodeck.dm @@ -37,20 +37,20 @@ list( 'sound/music/ambispace.ogg', 'sound/music/main.ogg', - 'sound/music/lobby/space.ogg', - 'sound/music/lobby/traitor.ogg' + 'sound/music/space.ogg', + 'sound/music/traitor.ogg' ) ), "picnicarea" = new /datum/holodeck_program(/area/horizon/holodeck/source_picnicarea, - list('sound/music/lobby/title2.ogg') + list('sound/music/title2.ogg') ), "dininghall" = new /datum/holodeck_program(/area/horizon/holodeck/source_dininghall, - list('sound/music/lobby/title2.ogg') + list('sound/music/title2.ogg') ), "theatre" = new /datum/holodeck_program(/area/horizon/holodeck/source_theatre), "meetinghall" = new /datum/holodeck_program(/area/horizon/holodeck/source_meetinghall), "courtroom" = new /datum/holodeck_program(/area/horizon/holodeck/source_courtroom, - list('sound/music/lobby/traitor.ogg') + list('sound/music/traitor.ogg') ), "burntest" = new /datum/holodeck_program(/area/horizon/holodeck/source_burntest, list()), "wildlifecarp" = new /datum/holodeck_program(/area/horizon/holodeck/source_wildlife, list()), diff --git a/sound/music/lobby/clouds.s3m b/sound/music/clouds.s3m similarity index 100% rename from sound/music/lobby/clouds.s3m rename to sound/music/clouds.s3m diff --git a/sound/music/licensing_information.txt b/sound/music/licensing_information.txt index b837d2d368c..45d3c85b66e 100644 --- a/sound/music/licensing_information.txt +++ b/sound/music/licensing_information.txt @@ -68,11 +68,17 @@ Author: Eric Schumaker AKA CBoyardee License: N/A Link: N/A ---------- +File Name: title3.ogg +Original Title: Tintin On The Moon +Author: Jeroen Tel +License: N/A +Link: https://www.youtube.com/watch?v=YKVmXn-Gv0M +---------- File Name: title3mk2.ogg Original Title: Tintin On The Moon -Author: Jeroen Tel (original), PinkBlossom6 (Mk. II) +Author: PinkBlossom6 License: Creative Commons Attribution License (reuse allowed) -Link: Mk I: https://www.youtube.com/watch?v=YKVmXn-Gv0M, Mk II: https://www.youtube.com/watch?v=d7hc_GrZP4Y +Link: https://www.youtube.com/watch?v=d7hc_GrZP4Y ---------- File Name: traitor.ogg Original Title: Absconditus @@ -80,16 +86,39 @@ Author: Joseph Toscano AKA Zhaytee License: CC BY-NC-SA 3.0 Link: https://bandcamp.zhaytee.net/track/absconditus ---------- -File Name: velvet_rose.ogg -Original Title: Velvet Rose -Author: Naelynn -License: CC0 1.0 -License Link: https://github.com/Aurorastation/Aurora.3/pull/7729#issuecomment-567239575 -Link: https://github.com/Aurorastation/Aurora.3/pull/7729 ----------- File Name: phoron_deposit.ogg Original Title: earth rumble & Perpetual Tension Author: Reitanna & Zander Noriega License: CC0 & CC-BY 3.0 Link: https://freesound.org/people/Reitanna/sounds/217657/ Link 2: https://opengameart.org/content/perpetual-tension +---------- +File Name: yuki_satellites.xm +Original Title: Yuki Satellites +Author: Rymdlego (Radix) +License: CC0 1.0 +Link: https://www.youtube.com/watch?v=PXTZA5bqIJ0 +---------- +File Name: snow.ogg +Original Title: Snow (Vo1k1 Ashes Mix) +Author: vo1k1 +License: CC BY-NC-SA 4.0 +Link: http://dig.ccmixter.org/files/vo1k1/69013 +---------- +File Name: saturn.ogg +Original Title: SATURN +Author: onlymeith +License: CC BY-NC-SA 4.0 +Link: http://dig.ccmixter.org/files/onlymeith/55024 +---------- +File Name: anotherstory.ogg +Original Title: anotherStory +Author: airtone +License: CC BY-NC-SA 4.0 +Link: http://dig.ccmixter.org/files/airtone/64312 +---------- +File Name: kaaistoep.ogg +Original Title: Kaaistoep +Author: Doxent Zsigmond +License: CC BY-NC-SA 4.0 +Link: http://dig.ccmixter.org/files/doxent/58480 \ No newline at end of file diff --git a/sound/music/lobby/anotherstory.ogg b/sound/music/lobby/anotherstory.ogg new file mode 100644 index 00000000000..c96935fbaf3 Binary files /dev/null and b/sound/music/lobby/anotherstory.ogg differ diff --git a/sound/music/lobby/kaaistoep.ogg b/sound/music/lobby/kaaistoep.ogg new file mode 100644 index 00000000000..a3c659696af Binary files /dev/null and b/sound/music/lobby/kaaistoep.ogg differ diff --git a/sound/music/lobby/saturn.ogg b/sound/music/lobby/saturn.ogg new file mode 100644 index 00000000000..66ce0ebb6b5 Binary files /dev/null and b/sound/music/lobby/saturn.ogg differ diff --git a/sound/music/lobby/snow.ogg b/sound/music/lobby/snow.ogg new file mode 100644 index 00000000000..02c47527dfd Binary files /dev/null and b/sound/music/lobby/snow.ogg differ diff --git a/sound/music/lobby/yuki_satellites.xm b/sound/music/lobby/yuki_satellites.xm new file mode 100644 index 00000000000..92895ff2ad9 Binary files /dev/null and b/sound/music/lobby/yuki_satellites.xm differ diff --git a/sound/music/lobby/space.ogg b/sound/music/space.ogg similarity index 100% rename from sound/music/lobby/space.ogg rename to sound/music/space.ogg diff --git a/sound/music/lobby/title2.ogg b/sound/music/title2.ogg similarity index 100% rename from sound/music/lobby/title2.ogg rename to sound/music/title2.ogg diff --git a/sound/music/title3.ogg b/sound/music/title3.ogg new file mode 100644 index 00000000000..5852d53c979 Binary files /dev/null and b/sound/music/title3.ogg differ diff --git a/sound/music/lobby/title3mk2.ogg b/sound/music/title3mk2.ogg similarity index 100% rename from sound/music/lobby/title3mk2.ogg rename to sound/music/title3mk2.ogg diff --git a/sound/music/lobby/traitor.ogg b/sound/music/traitor.ogg similarity index 100% rename from sound/music/lobby/traitor.ogg rename to sound/music/traitor.ogg diff --git a/sound/music/velvet_rose.ogg b/sound/music/velvet_rose.ogg deleted file mode 100644 index e1797faaf49..00000000000 Binary files a/sound/music/velvet_rose.ogg and /dev/null differ diff --git a/sound/serversound_list.txt b/sound/serversound_list.txt index 7ae5a94a0a9..306c1d875ba 100644 --- a/sound/serversound_list.txt +++ b/sound/serversound_list.txt @@ -9,6 +9,6 @@ sound/music/space.ogg sound/music/thunderdome.ogg sound/music/title1.ogg sound/music/title2.ogg +sound/music/title3.ogg sound/music/title3mk2.ogg sound/music/lobby/traitor.ogg -sound/music/velvet_rose.ogg