diff --git a/Content.Server/Chat/Systems/ChatSystem.cs b/Content.Server/Chat/Systems/ChatSystem.cs index f5b1dac3e9..821d4435da 100644 --- a/Content.Server/Chat/Systems/ChatSystem.cs +++ b/Content.Server/Chat/Systems/ChatSystem.cs @@ -25,7 +25,6 @@ using Content.Shared.Players; using Content.Shared.Radio; using Content.Shared._White; using Content.Shared.Speech; -using Content.Shared._White.Cult; using Content.Shared._White.Cult.Systems; using Robust.Server.Player; using Robust.Shared.Audio; @@ -82,7 +81,9 @@ public sealed partial class ChatSystem : SharedChatSystem private bool _critLoocEnabled; private const bool AdminLoocEnabled = true; private const string ChatNamePalette = "ChatNames"; - + //Amour Edit + private readonly Dictionary _loocCooldowns = new(); + //Amour Edit public override void Initialize() { base.Initialize(); @@ -733,6 +734,15 @@ public sealed partial class ChatSystem : SharedChatSystem if (!_critLoocEnabled && _mobStateSystem.IsCritical(source)) return; + //Amour EDIT + if (_loocCooldowns.TryGetValue(source, out var lastLoocTime) && DateTime.UtcNow - lastLoocTime < TimeSpan.FromSeconds(60)) //LOOC Cooldowns + { + return; + } + + _loocCooldowns[source] = DateTime.UtcNow; + //Amour Edit + var wrappedMessage = Loc.GetString("chat-manager-entity-looc-wrap-message", ("entityName", name), ("message", FormattedMessage.EscapeText(message)));