Adds a volume channel for system sounds (roundstart, votes, etc)

This commit is contained in:
Ava
2023-07-27 18:10:27 -04:00
parent f192cfd812
commit 986f542973
3 changed files with 8 additions and 3 deletions
+2
View File
@@ -335,6 +335,7 @@ var/global/list/##LIST_NAME = list();\
#define VOLUME_CHANNEL_AMBIENCE "Ambience"
#define VOLUME_CHANNEL_ALARMS "Alarms"
#define VOLUME_CHANNEL_DOORS "Doors"
#define VOLUME_CHANNEL_SYSTEM "System"
// Make sure you update this or clients won't be able to adjust the channel
GLOBAL_LIST_INIT(all_volume_channels, list(
@@ -342,6 +343,7 @@ GLOBAL_LIST_INIT(all_volume_channels, list(
VOLUME_CHANNEL_AMBIENCE,
VOLUME_CHANNEL_ALARMS,
VOLUME_CHANNEL_DOORS,
VOLUME_CHANNEL_SYSTEM,
))
/*
+4 -2
View File
@@ -79,7 +79,8 @@ var/global/datum/controller/subsystem/ticker/ticker
/datum/controller/subsystem/ticker/proc/pregame_welcome()
to_world("<span class='boldannounce notice'><em>Welcome to the pregame lobby!</em></span>")
to_world("<span class='boldannounce notice'>Please set up your character and select ready. The round will start in [pregame_timeleft] seconds.</span>")
world << sound('sound/misc/server-ready.ogg', volume = 100)
for (var/mob/M in player_list)
M.playsound_local(null, 'sound/misc/server-ready.ogg', 100, FALSE, is_global = TRUE, volume_channel = VOLUME_CHANNEL_SYSTEM)
// Called during GAME_STATE_PREGAME (RUNLEVEL_LOBBY)
/datum/controller/subsystem/ticker/proc/pregame_tick()
@@ -185,7 +186,8 @@ var/global/datum/controller/subsystem/ticker/ticker
if (S.name != "AI")
qdel(S)
to_world("<span class='boldannounce notice'><em>Enjoy the game!</em></span>")
world << sound('sound/AI/welcome.ogg') // Skie
for (var/mob/M in player_list)
M.playsound_local(null, 'sound/AI/welcome.ogg', 100, FALSE, is_global = TRUE, volume_channel = VOLUME_CHANNEL_SYSTEM)
//Holiday Round-start stuff ~Carn
Holiday_Game_Start()
+2 -1
View File
@@ -255,7 +255,8 @@ SUBSYSTEM_DEF(vote)
to_world("<font color='purple'><b>[text]</b>\nType <b>vote</b> or click <a href='?src=\ref[src]'>here</a> to place your votes.\nYou have [config.vote_period / 10] seconds to vote.</font>")
if(vote_type == VOTE_CREW_TRANSFER || vote_type == VOTE_GAMEMODE || vote_type == VOTE_CUSTOM)
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3)
for (var/mob/M in player_list)
M.playsound_local(null, 'sound/ambience/alarm4.ogg', 50, FALSE, is_global = TRUE, channel = 3, volume_channel = VOLUME_CHANNEL_SYSTEM)
if(mode == VOTE_GAMEMODE && round_progressing)
gamemode_vote_called = TRUE