CatStation/Content.Shared/EntityConditions/Conditions/Generic/IsGhostConditionSystem.cs
2026-08-03 07:16:25 +00:00

22 lines
739 B
C#

using Content.Shared.Ghost.Components;
using Robust.Shared.Prototypes;
namespace Content.Shared.EntityConditions.Conditions.Generic;
/// <summary>
/// Returns true if the entity is a ghost.
/// </summary>
public sealed class IsGhostConditionSystem : EntityConditionSystem<TransformComponent, IsGhostCondition>
{
protected override void Condition(Entity<TransformComponent> entity, ref EntityConditionEvent<IsGhostCondition> args)
{
args.Result = HasComp<GhostComponent>(entity);
}
}
/// <inheritdoc cref="EntityCondition"/>
public sealed partial class IsGhostCondition : EntityConditionBase<IsGhostCondition>
{
public override string EntityConditionGuidebookText(IPrototypeManager prototype) => String.Empty;
}