ID card console (#324)

* ID card console

* Container -> ContainerSlot
This commit is contained in:
DamianX
2019-09-06 08:12:44 +02:00
committed by Pieter-Jan Briers
parent ba8b495ec0
commit 6e2799f048
54 changed files with 661 additions and 10 deletions

View File

@@ -13,9 +13,17 @@ namespace Content.Server.GameObjects.Components.Access
public class AccessReader : Component
{
public override string Name => "AccessReader";
[ViewVariables]
private List<string> _necessaryTags;
[ViewVariables]
private List<string> _sufficientTags;
/// <summary>
/// Searches an <see cref="AccessComponent"/> in the entity itself, in its active hand or in its ID slot.
/// Returns true if an <see cref="AccessComponent"/> is found and its tags list contains
/// at least one of <see cref="_sufficientTags"/> or all of <see cref="_necessaryTags"/>.
/// </summary>
/// <param name="entity">The entity to be searched for access.</param>
public bool IsAllowed(IEntity entity)
{
var accessProvider = FindAccessProvider(entity);