Fingerprint taking improvements (#31864)
* now using event to check access to fingerprint * Opps actually commiting the changes --------- Co-authored-by: YourUsername <you@example.com> Co-authored-by: beck-thompson <beck314159@hotmail.com>
This commit is contained in:
@@ -18,6 +18,8 @@ namespace Content.Server.Forensics
|
||||
[Dependency] private readonly SharedDoAfterSystem _doAfterSystem = default!;
|
||||
[Dependency] private readonly InventorySystem _inventory = default!;
|
||||
[Dependency] private readonly PopupSystem _popupSystem = default!;
|
||||
[Dependency] private readonly MetaDataSystem _metaData = default!;
|
||||
[Dependency] private readonly ForensicsSystem _forensics = default!;
|
||||
[Dependency] private readonly LabelSystem _label = default!;
|
||||
|
||||
public override void Initialize()
|
||||
@@ -58,9 +60,14 @@ namespace Content.Server.Forensics
|
||||
return;
|
||||
}
|
||||
|
||||
if (_inventory.TryGetSlotEntity(args.Target.Value, "gloves", out var gloves))
|
||||
if (!_forensics.CanAccessFingerprint(args.Target.Value, out var blocker))
|
||||
{
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-gloves", ("target", Identity.Entity(args.Target.Value, EntityManager))), args.Target.Value, args.User);
|
||||
|
||||
if (blocker is { } item)
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-no-access-due", ("entity", Identity.Entity(item, EntityManager))), args.Target.Value, args.User);
|
||||
else
|
||||
_popupSystem.PopupEntity(Loc.GetString("forensic-pad-no-access"), args.Target.Value, args.User);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user