Merge remote-tracking branch 'upstream/stable' into ed-30-04-2025-upstream-sync
# Conflicts: # Content.Client/Parallax/ParallaxControl.cs # Content.Client/UserInterface/Systems/Storage/Controls/ItemGridPiece.cs # Content.IntegrationTests/Tests/PostMapInitTest.cs # Content.Server/Chat/Managers/ChatManager.cs # Content.Server/Fluids/EntitySystems/PuddleSystem.Evaporation.cs # Content.Server/Labels/Label/LabelSystem.cs # Content.Shared/Actions/SharedActionsSystem.cs # Content.Shared/Fluids/Components/EvaporationComponent.cs # Content.Shared/Labels/EntitySystems/SharedLabelSystem.cs # README.md # Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml # Resources/Prototypes/Maps/Pools/deathmatch.yml # Resources/Prototypes/Maps/arenas.yml
This commit is contained in:
@@ -46,6 +46,7 @@ internal sealed partial class ChatManager : IChatManager
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
[Dependency] private readonly PlayerRateLimitManager _rateLimitManager = default!;
|
||||
[Dependency] private readonly ICP14SponsorManager _sponsor = default!; //CP14 OCC color
|
||||
[Dependency] private readonly ISharedPlayerManager _player = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum length a player-sent message can be sent
|
||||
@@ -182,7 +183,12 @@ internal sealed partial class ChatManager : IChatManager
|
||||
var adminSystem = _entityManager.System<AdminSystem>();
|
||||
var antag = mind.UserId != null && (adminSystem.GetCachedPlayerInfo(mind.UserId.Value)?.Antag ?? false);
|
||||
|
||||
SendAdminAlert($"{mind.Session?.Name}{(antag ? " (ANTAG)" : "")} {message}");
|
||||
// We shouldn't be repeating this but I don't want to touch any more chat code than necessary
|
||||
var playerName = mind.UserId is { } userId && _player.TryGetSessionById(userId, out var session)
|
||||
? session.Name
|
||||
: "Unknown";
|
||||
|
||||
SendAdminAlert($"{playerName}{(antag ? " (ANTAG)" : "")} {message}");
|
||||
}
|
||||
|
||||
public void SendHookOOC(string sender, string message)
|
||||
|
||||
Reference in New Issue
Block a user