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:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.Access.Systems;
|
||||
using Content.Server.AI.Pathfinding.Accessible;
|
||||
using Content.Server.AI.Pathfinding.Pathfinders;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -117,9 +118,10 @@ namespace Content.Server.AI.Pathfinding
|
||||
return false;
|
||||
}
|
||||
|
||||
var accessSystem = EntitySystem.Get<AccessReaderSystem>();
|
||||
foreach (var reader in node.AccessReaders)
|
||||
{
|
||||
if (!reader.IsAllowed(access))
|
||||
if (!accessSystem.IsAllowed(reader, access))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user