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:
Nemanja
2023-08-14 19:34:23 -04:00
committed by GitHub
parent 8b0eb7e4de
commit 7ddee71379
40 changed files with 299 additions and 175 deletions

View File

@@ -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);