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

@@ -28,10 +28,12 @@ namespace Content.Shared.Construction.Steps
if (!entityManager.TryGetComponent(uid, out TagComponent? tags))
return false;
if (_allTags != null && !tags.HasAllTags(_allTags))
var tagSystem = EntitySystem.Get<TagSystem>();
if (_allTags != null && !tagSystem.HasAllTags(tags, _allTags))
return false; // We don't have all the tags needed.
if (_anyTags != null && !tags.HasAnyTag(_anyTags))
if (_anyTags != null && !tagSystem.HasAnyTag(tags, _anyTags))
return false; // We don't have any of the tags needed.
// This entity is valid!

View File

@@ -12,7 +12,8 @@ namespace Content.Shared.Construction.Steps
public override bool EntityValid(EntityUid uid, IEntityManager entityManager)
{
return !string.IsNullOrEmpty(_tag) && entityManager.TryGetComponent(uid, out TagComponent? tags) && tags.HasTag(_tag);
var tagSystem = EntitySystem.Get<TagSystem>();
return !string.IsNullOrEmpty(_tag) && tagSystem.HasTag(uid, _tag);
}
}
}