del cooldown looc
This commit is contained in:
@@ -82,9 +82,7 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||||||
private bool _deadLoocEnabled;
|
private bool _deadLoocEnabled;
|
||||||
private bool _critLoocEnabled;
|
private bool _critLoocEnabled;
|
||||||
private readonly bool _adminLoocEnabled = true;
|
private readonly bool _adminLoocEnabled = true;
|
||||||
//Amour Edit
|
|
||||||
private readonly Dictionary<EntityUid, DateTime> _loocCooldowns = new();
|
|
||||||
//Amour Edit
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
@@ -736,15 +734,6 @@ public sealed partial class ChatSystem : SharedChatSystem
|
|||||||
if (!_critLoocEnabled && _mobStateSystem.IsCritical(source))
|
if (!_critLoocEnabled && _mobStateSystem.IsCritical(source))
|
||||||
return;
|
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",
|
var wrappedMessage = Loc.GetString("chat-manager-entity-looc-wrap-message",
|
||||||
("entityName", name),
|
("entityName", name),
|
||||||
("message", FormattedMessage.EscapeText(message)));
|
("message", FormattedMessage.EscapeText(message)));
|
||||||
|
|||||||
Reference in New Issue
Block a user