Add nuke ops greeting sound (#9862)

This commit is contained in:
Morb
2022-08-08 05:27:08 +03:00
committed by GitHub
parent 6aa36e4c83
commit ccb70fd9b6
3 changed files with 14 additions and 2 deletions

View File

@@ -23,7 +23,9 @@ using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Utility;
using Content.Server.Traitor;
using System.Data;
using Content.Shared.Sound;
using Robust.Shared.Audio;
using Robust.Shared.Player;
namespace Content.Server.GameTicking.Rules;
@@ -44,6 +46,8 @@ public sealed class NukeopsRuleSystem : GameRuleSystem
public override string Prototype => "Nukeops";
private readonly SoundSpecifier _greetSound = new SoundPathSpecifier("/Audio/Misc/nukeops.ogg");
private const string NukeopsPrototypeId = "Nukeops";
private const string NukeopsCommanderPrototypeId = "NukeopsCommander";
@@ -293,6 +297,12 @@ public sealed class NukeopsRuleSystem : GameRuleSystem
GameTicker.PlayerJoinGame(session);
}
SoundSystem.Play(_greetSound.GetSound(), Filter.Empty().AddWhere(s =>
{
var mind = ((IPlayerSession) s).Data.ContentData()?.Mind;
return mind != null && _aliveNukeops.ContainsKey(mind);
}), AudioParams.Default);
}
//For admins forcing someone to nukeOps.