From c433e13c529eb5cd07d89c9f7d594e301f901807 Mon Sep 17 00:00:00 2001 From: SimpleStation14 Date: Mon, 22 Apr 2024 05:52:24 -0400 Subject: [PATCH] Cherry-picked commit b9db06ebb1af41f2809f6c31dc4990b6a729d041 from space-wizards/space-station-14/master --- Content.Server/GameTicking/GameTicker.Player.cs | 9 +++++++++ Content.Shared/CCVar/CCVars.cs | 6 ++++++ Resources/Audio/Effects/attributions.yml | 5 +++++ Resources/Audio/Effects/newplayerping.ogg | Bin 0 -> 8967 bytes 4 files changed, 20 insertions(+) create mode 100644 Resources/Audio/Effects/newplayerping.ogg diff --git a/Content.Server/GameTicking/GameTicker.Player.cs b/Content.Server/GameTicking/GameTicker.Player.cs index f3d8adafb1d..a3e33117cc6 100644 --- a/Content.Server/GameTicking/GameTicker.Player.cs +++ b/Content.Server/GameTicking/GameTicker.Player.cs @@ -1,10 +1,13 @@ using Content.Server.Database; +using Content.Shared.CCVar; using Content.Shared.GameTicking; using Content.Shared.GameWindow; using Content.Shared.Players; using Content.Shared.Preferences; using JetBrains.Annotations; using Robust.Server.Player; +using Robust.Shared.Audio; +using Robust.Shared.Audio.Systems; using Robust.Shared.Enums; using Robust.Shared.Player; using Robust.Shared.Timing; @@ -17,6 +20,7 @@ public sealed partial class GameTicker { [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IServerDbManager _dbManager = default!; + [Dependency] private readonly SharedAudioSystem _audioSystem = default!; private void InitializePlayer() { @@ -69,6 +73,11 @@ private async void PlayerStatusChanged(object? sender, SessionStatusEventArgs ar RaiseNetworkEvent(GetConnectionStatusMsg(), session.Channel); + if (firstConnection && _configurationManager.GetCVar(CCVars.AdminNewPlayerJoinSound)) + _audioSystem.PlayGlobal(new SoundPathSpecifier("/Audio/Effects/newplayerping.ogg"), + Filter.Empty().AddPlayers(_adminManager.ActiveAdmins), false, + audioParams: new AudioParams { Volume = -5f }); + if (LobbyEnabled && _roundStartCountdownHasNotStartedYetDueToNoPlayers) { _roundStartCountdownHasNotStartedYetDueToNoPlayers = false; diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index 6427faa113f..e2eebb4c205 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -772,6 +772,12 @@ public static readonly CVarDef public static readonly CVarDef SeeOwnNotes = CVarDef.Create("admin.see_own_notes", false, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + /// + /// Should the server play a quick sound to the active admins whenever a new player joins? + /// + public static readonly CVarDef AdminNewPlayerJoinSound = + CVarDef.Create("admin.new_player_join_sound", false, CVar.SERVERONLY); + /// /// The amount of days before the note starts fading. It will slowly lose opacity until it reaches stale. Set to 0 to disable. /// diff --git a/Resources/Audio/Effects/attributions.yml b/Resources/Audio/Effects/attributions.yml index f8568718461..a5f91ef10c6 100644 --- a/Resources/Audio/Effects/attributions.yml +++ b/Resources/Audio/Effects/attributions.yml @@ -216,3 +216,8 @@ copyright: Bhijn and Myr (github username deathride58) license: CC0-1.0 source: https://github.com/space-wizards/space-station-14/pull/23212 + +- files: ["newplayerping.ogg"] + copyright: TGStation at 3df5d3b42bfb6b3b5adba1067ab41f83816255bb + license: CC-BY-SA-3.0 + source: https://github.com/tgstation/tgstation/blob/3df5d3b42bfb6b3b5adba1067ab41f83816255bb/sound/misc/server-ready.ogg diff --git a/Resources/Audio/Effects/newplayerping.ogg b/Resources/Audio/Effects/newplayerping.ogg new file mode 100644 index 0000000000000000000000000000000000000000..216533b6f32b4a767cdfe7ec49aea1caef274bef GIT binary patch literal 8967 zcmeHsc|6o#+yD8DZH%QM*&<^?GmjD)ddE3#yZ?5!9=_QqCyg@$aAP-Lkj zA(bMsWKV^X=vI*|&lz>!&;9&!->={6et!QwpVyg>vs|C+I_G_zbDj4&Ox)be0Sf$i z%!PhuO7`ZHkxfYO34bS#0Cp9MeDjaU;_tsThza}4e?06j5m+idL~z1}ul|qc5yx*u zTVcDkhp)S`iN71}xQCO~nt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