* 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>
29 lines
943 B
C#
29 lines
943 B
C#
using Content.Shared.IdentityManagement.Components;
|
|
using Robust.Shared.Containers;
|
|
|
|
namespace Content.Shared.IdentityManagement;
|
|
|
|
public abstract class SharedIdentitySystem : EntitySystem
|
|
{
|
|
[Dependency] private readonly SharedContainerSystem _container = default!;
|
|
private static string SlotName = "identity";
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<IdentityComponent, ComponentInit>(OnComponentInit);
|
|
SubscribeLocalEvent<IdentityBlockerComponent, SeeIdentityAttemptEvent>(OnSeeIdentity);
|
|
}
|
|
|
|
private void OnSeeIdentity(EntityUid uid, IdentityBlockerComponent component, SeeIdentityAttemptEvent args)
|
|
{
|
|
args.Cancel();
|
|
}
|
|
|
|
protected virtual void OnComponentInit(EntityUid uid, IdentityComponent component, ComponentInit args)
|
|
{
|
|
component.IdentityEntitySlot = _container.EnsureContainer<ContainerSlot>(uid, SlotName);
|
|
}
|
|
}
|