mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Re-attempt at vv editing lobby music (#96093)
## About The Pull Request Previous attempt was in https://github.com/tgstation/tgstation/pull/95870 but I got 0 feedback and it just staled and closed. Instead of adding it as a secret button I am simply making it so vv editing the ticker's lobby music will properly update it for everyone. ## Why It's Good For The Game QoL for admins. ## Changelog 🆑 admin: Changing lobby music now updates for people in the lobby. /🆑
This commit is contained in:
@@ -203,6 +203,11 @@ SUBSYSTEM_DEF(ticker)
|
||||
else
|
||||
reboot_hud.maptext = MAPTEXT_PIXELLARI("<center>Server rebooting in:\n\ [DisplayTimeText(timeleft(SSticker.reboot_timer), 1)]</center>")
|
||||
|
||||
/datum/controller/subsystem/ticker/vv_edit_var(var_name, var_value)
|
||||
if(var_name == NAMEOF(src, login_music))
|
||||
set_lobby_music(var_value, override = TRUE)
|
||||
return ..()
|
||||
|
||||
/// Checks if the round should be ending, called every ticker tick
|
||||
/datum/controller/subsystem/ticker/proc/check_finished()
|
||||
if(!setup_done)
|
||||
@@ -887,6 +892,10 @@ SUBSYSTEM_DEF(ticker)
|
||||
return
|
||||
|
||||
login_music = new_music
|
||||
//we just overrode the song, let's update everyone.
|
||||
if(override)
|
||||
for(var/mob/dead/new_player/new_player as anything in GLOB.new_player_list)
|
||||
new_player?.client.playtitlemusic()
|
||||
|
||||
#undef ROUND_START_MUSIC_LIST
|
||||
#undef SS_TICKER_TRAIT
|
||||
|
||||
Reference in New Issue
Block a user