Add nuke ops greeting sound (#9862)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user