using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.ViewVariables;
namespace Content.Shared.Access.Components
{
///
/// Stores access levels necessary to "use" an entity
/// and allows checking if something or somebody is authorized with these access levels.
///
[RegisterComponent]
public sealed class AccessReaderComponent : Component
{
///
/// Whether this reader is enabled or not. If disabled, all access
/// checks will pass.
///
[ViewVariables(VVAccess.ReadWrite)]
public bool Enabled = true;
///
/// The set of tags that will automatically deny an allowed check, if any of them are present.
///
public HashSet DenyTags = new();
///
/// List of access lists to check allowed against. For an access check to pass
/// there has to be an access list that is a subset of the access in the checking list.
///
[DataField("access")]
[ViewVariables]
public List> AccessLists = new();
}
}