Skip to content

Commit

Permalink
bugfix: stop lobby music played by tgui panel (ss220-space#5803)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizzonium authored Aug 24, 2024
1 parent 2733897 commit 59b2a65
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion code/modules/admin/verbs/onlyone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
for(var/mob/M in GLOB.player_list)
if(M.client.prefs.sound & SOUND_MIDI)
if(isnewplayer(M) && (M.client.prefs.sound & SOUND_LOBBY))
M.stop_sound_channel(CHANNEL_LOBBYMUSIC)
// M.stop_sound_channel(CHANNEL_LOBBYMUSIC)
M.client?.tgui_panel?.stop_music()
music.volume = 100 * M.client.prefs.get_channel_volume(CHANNEL_ADMIN)
SEND_SOUND(M, music)

Expand Down
3 changes: 2 additions & 1 deletion code/modules/admin/verbs/playsound.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ GLOBAL_LIST_EMPTY(sounds_cache)
for(var/mob/M in GLOB.player_list)
if(M.client.prefs.sound & SOUND_MIDI)
if(isnewplayer(M) && (M.client.prefs.sound & SOUND_LOBBY))
M.stop_sound_channel(CHANNEL_LOBBYMUSIC)
// M.stop_sound_channel(CHANNEL_LOBBYMUSIC)
M.client?.tgui_panel?.stop_music()
uploaded_sound.volume = 100 * M.client.prefs.get_channel_volume(CHANNEL_ADMIN)
SEND_SOUND(M, uploaded_sound)

Expand Down
3 changes: 2 additions & 1 deletion code/modules/client/preference/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2503,7 +2503,8 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts
if((sound & SOUND_LOBBY) && user.client)
user.client.playtitlemusic()
else
user.stop_sound_channel(CHANNEL_LOBBYMUSIC)
// user.stop_sound_channel(CHANNEL_LOBBYMUSIC)
user.client?.tgui_panel?.stop_music()

if("ghost_ears")
toggles ^= PREFTOGGLE_CHAT_GHOSTEARS
Expand Down
6 changes: 4 additions & 2 deletions code/modules/mob/new_player/new_player.dm
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@
var/mob/dead/observer/observer = new()
src << browse(null, "window=playersetup")
spawning = 1
stop_sound_channel(CHANNEL_LOBBYMUSIC)
// stop_sound_channel(CHANNEL_LOBBYMUSIC)
client?.tgui_panel?.stop_music()


observer.started_as_observer = 1
Expand Down Expand Up @@ -628,7 +629,8 @@
client.prefs.real_name = random_name(client.prefs.gender)
client.prefs.copy_to(new_character)

stop_sound_channel(CHANNEL_LOBBYMUSIC)
// stop_sound_channel(CHANNEL_LOBBYMUSIC)
client?.tgui_panel?.stop_music()


if(mind)
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/transform_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

/mob/proc/AIize()
if(client)
stop_sound_channel(CHANNEL_LOBBYMUSIC)
// stop_sound_channel(CHANNEL_LOBBYMUSIC)
client?.tgui_panel?.stop_music()

var/mob/living/silicon/ai/O = new (loc,,,1)//No MMI but safety is in effect.
O.invisibility = 0
Expand Down

0 comments on commit 59b2a65

Please sign in to comment.