Id[entity] 2.0 (real) (#9612)
* starter API * network ID cards * Port more stuff from old identity * Re-implement identity representation + name updating * move * proper name returning for `IdentityName` * move everything important to server, give in to temptation * shared / server / client split sadly. move ensure to shared and spawn to server * identity update queueing + identityblocker * fixes * and just like that it's usable for admins * huge identity pass * pass dos * jesus christ * figs :D * fuck u * fix bad merge. Co-authored-by: Moony <moonheart08@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
using Content.Client.Administration.Managers;
|
||||
using Content.Shared.Administration;
|
||||
using Content.Shared.IdentityManagement;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -11,6 +15,7 @@ namespace Content.Client.ContextMenu.UI
|
||||
public const string StyleClassEntityMenuCountText = "contextMenuCount";
|
||||
|
||||
[Dependency] private IEntityManager _entityManager = default!;
|
||||
[Dependency] private IPlayerManager _playerManager = default!;
|
||||
|
||||
/// <summary>
|
||||
/// The entity that can be accessed by interacting with this element.
|
||||
@@ -74,10 +79,12 @@ namespace Content.Client.ContextMenu.UI
|
||||
|
||||
EntityIcon.Sprite = _entityManager.GetComponentOrNull<ISpriteComponent>(entity);
|
||||
|
||||
if (UserInterfaceManager.DebugMonitors.Visible)
|
||||
var admin = IoCManager.Resolve<IClientAdminManager>();
|
||||
|
||||
if (admin.HasFlag(AdminFlags.Admin | AdminFlags.Debug))
|
||||
Text = _entityManager.ToPrettyString(entity.Value);
|
||||
else
|
||||
Text = _entityManager.GetComponent<MetaDataComponent>(entity.Value).EntityName;
|
||||
Text = Identity.Name(entity.Value, _entityManager, _playerManager.LocalPlayer!.ControlledEntity!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user