More borg tweaks (#19143)
* borg tweaks but i'm gonna go code fun stuff first * werkin' on it * a ton of tweaks * fuck everyone and then myself
This commit is contained in:
@@ -18,8 +18,9 @@ namespace Content.Shared.PDA
|
||||
|
||||
SubscribeLocalEvent<PdaComponent, EntInsertedIntoContainerMessage>(OnItemInserted);
|
||||
SubscribeLocalEvent<PdaComponent, EntRemovedFromContainerMessage>(OnItemRemoved);
|
||||
}
|
||||
|
||||
SubscribeLocalEvent<PdaComponent, GetAdditionalAccessEvent>(OnGetAdditionalAccess);
|
||||
}
|
||||
protected virtual void OnComponentInit(EntityUid uid, PdaComponent pda, ComponentInit args)
|
||||
{
|
||||
if (pda.IdCard != null)
|
||||
@@ -53,6 +54,12 @@ namespace Content.Shared.PDA
|
||||
UpdatePdaAppearance(uid, pda);
|
||||
}
|
||||
|
||||
private void OnGetAdditionalAccess(EntityUid uid, PdaComponent component, ref GetAdditionalAccessEvent args)
|
||||
{
|
||||
if (component.ContainedId is { } id)
|
||||
args.Entities.Add(id);
|
||||
}
|
||||
|
||||
private void UpdatePdaAppearance(EntityUid uid, PdaComponent pda)
|
||||
{
|
||||
Appearance.SetData(uid, PdaVisuals.IdCardInserted, pda.ContainedId != null);
|
||||
|
||||
Reference in New Issue
Block a user