This commit is contained in:
metalgearsloth
2022-02-08 14:08:11 +11:00
committed by GitHub
parent ef6aa43031
commit 70c0a502cf
24 changed files with 641 additions and 628 deletions

View File

@@ -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;
}