mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
22 lines
739 B
C#
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;
|
|
}
|