AutoLink port from Outer Rim (#10967)
* C# half of Outer Rim commit 5081906bd17e715ecae422dd7a003d9f103e6884 "autolink gaming." Ported from Outer Rim with permission. * YAML half of Outer Rim commit 5081906bd17e715ecae422dd7a003d9f103e6884 "autolink gaming." Ported from Outer Rim with permission. * commit fixed AL summary Co-authored-by: Moony <moonheart08@users.noreply.github.com> * NewLinkEvent.User & LinkAttemptEvent.User now nullable, fix possible AccessReaderSystem AutoLink bug Co-authored-by: Moony <moonheart08@users.noreply.github.com>
This commit is contained in:
@@ -26,7 +26,9 @@ namespace Content.Shared.Access.Systems
|
||||
|
||||
private void OnLinkAttempt(EntityUid uid, AccessReaderComponent component, LinkAttemptEvent args)
|
||||
{
|
||||
if (component.Enabled && !IsAllowed(args.User, component))
|
||||
if (args.User == null) // AutoLink (and presumably future external linkers) have no user.
|
||||
return;
|
||||
if (component.Enabled && !IsAllowed(args.User.Value, component))
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user