Class EntityWhitelist
Used to determine whether an entity fits a certain whitelist. Does not whitelist by prototypes, since that is undesirable; you're better off just adding a tag to all entity prototypes that need to be whitelisted, and checking for that.
Inheritance
System.Object
EntityWhitelist
Namespace: Content.Shared.Whitelist
Assembly: Content.Shared.dll
Syntax
public sealed class EntityWhitelist : object
Fields
| Improve this Doc View SourceComponents
Component names that are allowed in the whitelist.
Declaration
public string[] Components
Field Value
Type | Description |
---|---|
System.String[] |
RequireAll
If false, an entity only requires one of these components or tags to pass the whitelist. If true, an entity requires to have ALL of these components and tags to pass.
Declaration
public bool RequireAll
Field Value
Type | Description |
---|---|
System.Boolean |
Tags
Tags that are allowed in the whitelist.
Declaration
public List<string>? Tags
Field Value
Type | Description |
---|---|
System.Nullable<List<System.String>> |
Methods
| Improve this Doc View SourceIsValid(EntityUid, Nullable<IEntityManager>)
Returns whether a given entity fits the whitelist.
Declaration
public bool IsValid(EntityUid uid, IEntityManager? entityManager = null)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | uid | |
System.Nullable<IEntityManager> | entityManager |
Returns
Type | Description |
---|---|
System.Boolean |
UpdateRegistrations()
Declaration
public void UpdateRegistrations()