mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Revert "Makes lobby music use youtube-dl and goonchat"
This commit is contained in:
@@ -60,7 +60,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
/datum/controller/subsystem/ticker/Initialize(timeofday)
|
||||
load_mode()
|
||||
|
||||
/*var/list/byond_sound_formats = list( //yogs start - goonchat lobby music
|
||||
var/list/byond_sound_formats = list(
|
||||
"mid" = TRUE,
|
||||
"midi" = TRUE,
|
||||
"mod" = TRUE,
|
||||
@@ -111,10 +111,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
music = world.file2list(ROUND_START_MUSIC_LIST, "\n")
|
||||
login_music = pick(music)
|
||||
else
|
||||
login_music = "[global.config.directory]/title_music/sounds/[pick(music)]"*/
|
||||
login_music = choose_lobby_music()
|
||||
if(!login_music)
|
||||
to_chat(world, "<span class='boldwarning'>Could not load lobby music.</span>") //yogs end
|
||||
login_music = "[global.config.directory]/title_music/sounds/[pick(music)]"
|
||||
|
||||
|
||||
if(!GLOB.syndicate_code_phrase)
|
||||
GLOB.syndicate_code_phrase = generate_code_phrase()
|
||||
|
||||
@@ -98,18 +98,14 @@
|
||||
next_channel = 1
|
||||
|
||||
/mob/proc/stop_sound_channel(chan)
|
||||
if(chan == CHANNEL_LOBBYMUSIC && src.client && src.client.chatOutput) //yogs start
|
||||
src.client.chatOutput.stopLobbyMusic()
|
||||
return //yogs end
|
||||
SEND_SOUND(src, sound(null, repeat = 0, wait = 0, channel = chan))
|
||||
|
||||
/*/client/proc/playtitlemusic(vol = 85) //yogs start - moved to yogstation/code/game/sound.dm
|
||||
/client/proc/playtitlemusic(vol = 85)
|
||||
set waitfor = FALSE
|
||||
UNTIL(SSticker.login_music) //wait for SSticker init to set the login music
|
||||
|
||||
if(prefs && (prefs.toggles & SOUND_LOBBY))
|
||||
SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = vol, channel = CHANNEL_LOBBYMUSIC)) // MAD JAMS
|
||||
*/ //yogs end
|
||||
|
||||
/proc/get_rand_frequency()
|
||||
return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs.
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<audio class="hidden" id="adminMusic" autoplay></audio>
|
||||
<audio class="hidden" id="lobbyMusic" autoplay loop></audio> <!--yogs - lobby music -->
|
||||
<script type="text/javascript" src="browserOutput.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -507,8 +507,6 @@ function ehjaxCallback(data) {
|
||||
internalOutput('<div class="connectionClosed internal restarting">The connection has been closed because the server is restarting. Please wait while you automatically reconnect.</div>', 'internal');
|
||||
} else if (data == 'stopMusic') {
|
||||
$('#adminMusic').prop('src', '');
|
||||
} else if (data == 'stopLobbyMusic') { //yogs start - lobby music
|
||||
$('#lobbyMusic').prop('src', ''); //yogs end
|
||||
} else {
|
||||
//Oh we're actually being sent data instead of an instruction
|
||||
var dataJ;
|
||||
@@ -557,15 +555,7 @@ function ehjaxCallback(data) {
|
||||
$('#adminMusic').prop('src', adminMusic);
|
||||
$('#adminMusic').trigger("play");
|
||||
}
|
||||
} else if (data.lobbyMusic) { //yogs start - lobby music
|
||||
if (typeof data.lobbyMusic === 'string') {
|
||||
var lobbyMusic = byondDecode(data.lobbyMusic);
|
||||
lobbyMusic = lobbyMusic.match(/https?:\/\/\S+/) || '';
|
||||
$('#lobbyMusic').prop('defaultPlaybackRate', 1.0);
|
||||
$('#lobbyMusic').prop('src', lobbyMusic);
|
||||
$('#lobbyMusic').trigger("play");
|
||||
}
|
||||
} //yogs end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -726,7 +716,6 @@ $(function() {
|
||||
if (savedConfig.smusicVolume) {
|
||||
var newVolume = clamp(savedConfig.smusicVolume, 0, 100);
|
||||
$('#adminMusic').prop('volume', newVolume / 100);
|
||||
$('#lobbyMusic').prop('volume', newVolume / 100); //yogs
|
||||
$('#musicVolume').val(newVolume);
|
||||
opts.updatedVolume = newVolume;
|
||||
sendVolumeUpdate();
|
||||
@@ -734,7 +723,6 @@ $(function() {
|
||||
}
|
||||
else{
|
||||
$('#adminMusic').prop('volume', opts.defaultMusicVolume / 100);
|
||||
$('#lobbyMusic').prop('volume', opts.defaultMusicVolume / 100); //yogs
|
||||
}
|
||||
|
||||
if (savedConfig.smessagecombining) {
|
||||
@@ -1075,7 +1063,6 @@ $(function() {
|
||||
var newVolume = $('#musicVolume').val();
|
||||
newVolume = clamp(newVolume, 0, 100);
|
||||
$('#adminMusic').prop('volume', newVolume / 100);
|
||||
$('#lobbyMusic').prop('volume', newVolume / 100); //yogs
|
||||
setCookie('musicVolume', newVolume, 365);
|
||||
opts.updatedVolume = newVolume;
|
||||
if(!opts.volumeUpdating) {
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
https://www.youtube.com/watch?v=s7dTBoW5H9k
|
||||
https://www.youtube.com/watch?v=CfMMlT8Lyns
|
||||
https://www.youtube.com/watch?v=dLrdSC9MVb4
|
||||
https://www.youtube.com/watch?v=eFTLKWw542g
|
||||
https://www.youtube.com/watch?v=uc6f_2nPSX8
|
||||
https://www.youtube.com/watch?v=OXFh-mYh2dQ
|
||||
https://www.youtube.com/watch?v=pLJ85XExZtQ
|
||||
https://www.youtube.com/watch?v=At8ao5iABFg
|
||||
https://www.youtube.com/watch?v=YAXc87bmgLA
|
||||
https://www.youtube.com/watch?v=UPHmazxB38g
|
||||
https://www.youtube.com/watch?v=VGQZItOMz6k
|
||||
https://www.youtube.com/watch?v=YgGzAKP_HuM
|
||||
https://soundcloud.com/jeffimam/title-plasma-attack
|
||||
https://www.youtube.com/watch?v=L0VjlFqp47g
|
||||
https://www.youtube.com/watch?v=KKny_ia8Fvo
|
||||
https://www.youtube.com/watch?v=KaOC9danxNo
|
||||
@@ -2762,7 +2762,6 @@
|
||||
#include "yogstation\code\controllers\configuration\entries\yogstation_config.dm"
|
||||
#include "yogstation\code\controllers\subsystem\input.dm"
|
||||
#include "yogstation\code\controllers\subsystem\mapping.dm"
|
||||
#include "yogstation\code\controllers\subsystem\ticker.dm"
|
||||
#include "yogstation\code\controllers\subsystem\yogs.dm"
|
||||
#include "yogstation\code\datums\mind.dm"
|
||||
#include "yogstation\code\datums\mutations.dm"
|
||||
@@ -2779,7 +2778,6 @@
|
||||
#include "yogstation\code\datums\mood_events\generic_positive_events.dm"
|
||||
#include "yogstation\code\datums\ruins\free_miners.dm"
|
||||
#include "yogstation\code\datums\ruins\station.dm"
|
||||
#include "yogstation\code\game\sound.dm"
|
||||
#include "yogstation\code\game\world.dm"
|
||||
#include "yogstation\code\game\area\Space_Station_13_areas.dm"
|
||||
#include "yogstation\code\game\gamemodes\objective.dm"
|
||||
@@ -2898,7 +2896,6 @@
|
||||
#include "yogstation\code\modules\events\weightless.dm"
|
||||
#include "yogstation\code\modules\food_and_drinks\food\snacks_burger.dm"
|
||||
#include "yogstation\code\modules\food_and_drinks\food\snacks_meat.dm"
|
||||
#include "yogstation\code\modules\goonchat\browserOutput.dm"
|
||||
#include "yogstation\code\modules\jobs\job_types\captain.dm"
|
||||
#include "yogstation\code\modules\jobs\job_types\cargo_service.dm"
|
||||
#include "yogstation\code\modules\jobs\job_types\job.dm"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
/datum/controller/subsystem/ticker/proc/choose_lobby_music()
|
||||
var/list/songs = world.file2list("config/title_music/yogs_lobby_music.txt")
|
||||
if(!songs.len)
|
||||
log_world("There are no songs in config/title_music/yogs_lobby_music.txt, add some!")
|
||||
return
|
||||
var/selected = pick(songs)
|
||||
|
||||
var/ytdl = CONFIG_GET(string/invoke_youtubedl)
|
||||
if(!ytdl)
|
||||
to_chat(world, "<span class='boldwarning'>Youtube-dl was not configured.</span>")
|
||||
log_world("Could not play lobby song because youtube-dl is not configured properly, check the config.")
|
||||
return
|
||||
|
||||
var/list/output = world.shelleo("[ytdl] --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" -g --no-playlist -- \"[selected]\"")
|
||||
var/errorlevel = output[SHELLEO_ERRORLEVEL]
|
||||
var/stdout = output[SHELLEO_STDOUT]
|
||||
var/stderr = output[SHELLEO_STDERR]
|
||||
|
||||
if(errorlevel)
|
||||
to_chat(world, "<span class='boldwarning'>Youtube-dl failed.</span>")
|
||||
log_world("Could not play lobby song [selected]: [stderr]")
|
||||
return
|
||||
|
||||
return stdout
|
||||
@@ -1,7 +0,0 @@
|
||||
/client/proc/playtitlemusic(vol = 85)
|
||||
set waitfor = FALSE
|
||||
UNTIL(SSticker.login_music) //wait for SSticker init to set the login music
|
||||
UNTIL(chatOutput.loaded)
|
||||
|
||||
if(prefs && (prefs.toggles & SOUND_LOBBY))
|
||||
chatOutput.sendLobbyMusic(SSticker.login_music)
|
||||
@@ -1,8 +0,0 @@
|
||||
/datum/chatOutput/proc/sendLobbyMusic(music)
|
||||
if(!music)
|
||||
return
|
||||
var/list/music_data = list("lobbyMusic" = url_encode(url_encode(music)))
|
||||
ehjax_send(data = music_data)
|
||||
|
||||
/datum/chatOutput/proc/stopLobbyMusic()
|
||||
ehjax_send(data = "stopLobbyMusic")
|
||||
Reference in New Issue
Block a user