Move Access to ECS (#4826)
* Moved access to ecs * Fixed tests * Moved test to integration * Better IoC * Moved preset ID card * Moved id card to ECS * Moved access component to ECS * Fixed pda access * Final touches Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.Access.Components;
|
||||
using Content.Server.Access.Systems;
|
||||
using Content.Server.Advertise;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.Power.Components;
|
||||
@@ -191,7 +192,8 @@ namespace Content.Server.VendingMachines
|
||||
{
|
||||
if (Owner.TryGetComponent<AccessReader>(out var accessReader))
|
||||
{
|
||||
if (sender == null || !accessReader.IsAllowed(sender))
|
||||
var accessSystem = EntitySystem.Get<AccessReaderSystem>();
|
||||
if (sender == null || !accessSystem.IsAllowed(accessReader, sender.Uid))
|
||||
{
|
||||
Owner.PopupMessageEveryone(Loc.GetString("vending-machine-component-try-eject-access-denied"));
|
||||
Deny();
|
||||
|
||||
Reference in New Issue
Block a user