ECS tags (#6504)
This commit is contained in:
@@ -72,10 +72,11 @@ namespace Content.Shared.Whitelist
|
||||
public bool IsValid(EntityUid uid, IEntityManager? entityManager = null)
|
||||
{
|
||||
entityManager ??= IoCManager.Resolve<IEntityManager>();
|
||||
var tagSystem = EntitySystem.Get<TagSystem>();
|
||||
|
||||
if (Tags != null && entityManager.TryGetComponent(uid, out TagComponent? tags))
|
||||
{
|
||||
if (tags.HasAnyTag(Tags))
|
||||
if (tagSystem.HasAnyTag(tags, Tags))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user