Class AccessReaderSystem
Inheritance
Namespace: Content.Shared.Access.Systems
Assembly: Content.Shared.dll
Syntax
public sealed class AccessReaderSystem : EntitySystem
Methods
| Improve this Doc View SourceAreAccessTagsAllowed(ICollection<String>, AccessReaderComponent)
Compares the given tags with the readers access list to see if it is allowed.
Declaration
public bool AreAccessTagsAllowed(ICollection<string> accessTags, AccessReaderComponent reader)
Parameters
Type | Name | Description |
---|---|---|
ICollection<System.String> | accessTags | A list of access tags |
AccessReaderComponent | reader | An access reader to check against |
Returns
Type | Description |
---|---|
System.Boolean |
AreStationRecordKeysAllowed(ICollection<StationRecordKey>, AccessReaderComponent)
Compares the given stationrecordkeys with the accessreader to see if it is allowed.
Declaration
public bool AreStationRecordKeysAllowed(ICollection<StationRecordKey> keys, AccessReaderComponent reader)
Parameters
Type | Name | Description |
---|---|---|
ICollection<StationRecordKey> | keys | |
AccessReaderComponent | reader |
Returns
Type | Description |
---|---|
System.Boolean |
FindAccessItemsInventory(EntityUid, out HashSet<EntityUid>)
Declaration
public bool FindAccessItemsInventory(EntityUid uid, out HashSet<EntityUid> items)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | uid | |
HashSet<EntityUid> | items |
Returns
Type | Description |
---|---|
System.Boolean |
FindAccessTags(EntityUid, Nullable<HashSet<EntityUid>>)
Finds the access tags on the given entity
Declaration
public ICollection<string> FindAccessTags(EntityUid uid, HashSet<EntityUid>? items = null)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | uid | The entity that is being searched. |
System.Nullable<HashSet<EntityUid>> | items | All of the items to search for access. If none are passed in, FindPotentialAccessItems(EntityUid) will be used. |
Returns
Type | Description |
---|---|
ICollection<System.String> |
FindPotentialAccessItems(EntityUid)
Finds all the items that could potentially give access to a given entity
Declaration
public HashSet<EntityUid> FindPotentialAccessItems(EntityUid uid)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | uid |
Returns
Type | Description |
---|---|
HashSet<EntityUid> |
FindStationRecordKeys(EntityUid, out ICollection<StationRecordKey>, Nullable<HashSet<EntityUid>>)
Finds the access tags on the given entity
Declaration
public bool FindStationRecordKeys(EntityUid uid, out ICollection<StationRecordKey> recordKeys, HashSet<EntityUid>? items = null)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | uid | The entity that is being searched. |
ICollection<StationRecordKey> | recordKeys | |
System.Nullable<HashSet<EntityUid>> | items | All of the items to search for access. If none are passed in, FindPotentialAccessItems(EntityUid) will be used. |
Returns
Type | Description |
---|---|
System.Boolean |
Initialize()
Declaration
public override void Initialize()
IsAllowed(EntityUid, EntityUid, AccessReaderComponent)
Searches the source for access tags then compares it with the all targets accesses to see if it is allowed.
Declaration
public bool IsAllowed(EntityUid user, EntityUid target, AccessReaderComponent reader = null)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | user | The entity that wants access. |
EntityUid | target | The entity to search for an access reader |
AccessReaderComponent | reader | Optional reader from the target entity |
Returns
Type | Description |
---|---|
System.Boolean |
IsAllowed(ICollection<String>, ICollection<StationRecordKey>, EntityUid, AccessReaderComponent)
Check whether the given access permissions satisfy an access reader's requirements.
Declaration
public bool IsAllowed(ICollection<string> access, ICollection<StationRecordKey> stationKeys, EntityUid target, AccessReaderComponent reader)
Parameters
Type | Name | Description |
---|---|---|
ICollection<System.String> | access | |
ICollection<StationRecordKey> | stationKeys | |
EntityUid | target | |
AccessReaderComponent | reader |
Returns
Type | Description |
---|---|
System.Boolean |