Play special sound when you get chosen as traitor in SSS.

This commit is contained in:
Víctor Aguilera Puerto
2020-08-21 21:09:24 +02:00
parent 1086474cd0
commit b3156e9934
3 changed files with 10 additions and 0 deletions

View File

@@ -3,11 +3,15 @@ using System.Threading;
using Content.Server.GameObjects.Components.Suspicion;
using Content.Server.Interfaces.Chat;
using Content.Server.Interfaces.GameTicking;
using Content.Server.Mobs;
using Content.Server.Mobs.Roles;
using Content.Server.Players;
using Content.Shared.GameObjects.Components.Damage;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Server.Interfaces.Player;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.IoC;
using Timer = Robust.Shared.Timers.Timer;
@@ -33,6 +37,9 @@ namespace Content.Server.GameTicking.GameRules
{
_chatManager.DispatchServerAnnouncement("There are traitors on the station! Find them, and kill them!");
EntitySystem.Get<AudioSystem>().PlayGlobal("/Audio/Misc/tatoralert.ogg", AudioParams.Default,
(session) => session.ContentData().Mind?.HasRole<SuspicionTraitorRole>() ?? false);
Timer.SpawnRepeating(DeadCheckDelay, _checkWinConditions, _checkTimerCancel.Token);
}

View File

@@ -2,6 +2,9 @@ using System.Collections.Generic;
using System.Linq;
using Content.Server.Interfaces.Chat;
using Content.Shared.Roles;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Localization;
namespace Content.Server.Mobs.Roles

Binary file not shown.