Update admin overlay when player is renamed (#6180)
This commit is contained in:
@@ -33,7 +33,7 @@ namespace Content.Server.Administration
|
|||||||
SubscribeLocalEvent<RoleRemovedEvent>(OnRoleEvent);
|
SubscribeLocalEvent<RoleRemovedEvent>(OnRoleEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdatePlayerList(IPlayerSession player)
|
public void UpdatePlayerList(IPlayerSession player)
|
||||||
{
|
{
|
||||||
_playerList[player.UserId] = GetPlayerInfo(player);
|
_playerList[player.UserId] = GetPlayerInfo(player);
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Content.Server.PDA;
|
|||||||
using Content.Shared.Access.Components;
|
using Content.Shared.Access.Components;
|
||||||
using Content.Shared.Administration;
|
using Content.Shared.Administration;
|
||||||
using Content.Shared.PDA;
|
using Content.Shared.PDA;
|
||||||
|
using Robust.Server.GameObjects;
|
||||||
using Robust.Server.Player;
|
using Robust.Server.Player;
|
||||||
using Robust.Shared.Console;
|
using Robust.Shared.Console;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
@@ -90,6 +91,13 @@ public class RenameCommand : IConsoleCommand
|
|||||||
pdaSystem.SetOwner(pdaComponent, name);
|
pdaSystem.SetOwner(pdaComponent, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Admin Overlay
|
||||||
|
if (entSysMan.TryGetEntitySystem<AdminSystem>(out var adminSystem)
|
||||||
|
&& entMan.TryGetComponent<ActorComponent>(entityUid, out var actorComp))
|
||||||
|
{
|
||||||
|
adminSystem.UpdatePlayerList(actorComp.PlayerSession);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool TryParseUid(string str, IConsoleShell shell,
|
private static bool TryParseUid(string str, IConsoleShell shell,
|
||||||
|
|||||||
Reference in New Issue
Block a user