using Content.Shared.Construction; using JetBrains.Annotations; using Content.Shared.Doors.Components; using Content.Shared.Examine; using YamlDotNet.Core.Tokens; using Content.Shared.Tag; namespace Content.Server.Construction.Conditions { /// /// This condition checks whether if an entity with the possesses a specific tag /// [UsedImplicitly] [DataDefinition] public sealed partial class HasTag : IGraphCondition { /// /// The tag the entity is being checked for /// [DataField("tag")] public string Tag { get; private set; } public bool Condition(EntityUid uid, IEntityManager entityManager) { if (!entityManager.TrySystem(out var tagSystem)) return false; return tagSystem.HasTag(uid, Tag); } public bool DoExamine(ExaminedEvent args) { return false; } public IEnumerable GenerateGuideEntry() { yield return new ConstructionGuideEntry() { }; } } }