Event based lock access (#40883)

* init

* some bonus stuff

* CheckForAnyReaders

* reader

* doc

* review

* fuck yaml

* Me when I push changes myshelf

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
ScarKy0
2025-10-17 04:04:43 +02:00
committed by GitHub
parent 853bb1d3c0
commit ee33792b33
7 changed files with 195 additions and 36 deletions

View File

@@ -162,7 +162,7 @@ public abstract class SharedDeliverySystem : EntitySystem
private bool TryUnlockDelivery(Entity<DeliveryComponent> ent, EntityUid user, bool rewardMoney = true, bool force = false)
{
// Check fingerprint access if there is a reader on the mail
if (!force && TryComp<FingerprintReaderComponent>(ent, out var reader) && !_fingerprintReader.IsAllowed((ent, reader), user))
if (!force && !_fingerprintReader.IsAllowed(ent.Owner, user, out _))
return false;
var deliveryName = _nameModifier.GetBaseName(ent.Owner);