mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* i guess one big mega commit sorry * cleanup and reviews * mfw you cherrypick from an outdated commit on the other branch and its all fucked up and the world sees it.. * reviews
21 lines
697 B
C#
21 lines
697 B
C#
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.EntityConditions.Conditions.Generic;
|
|
|
|
/// <summary>
|
|
/// Returns true if the entity is in space.
|
|
/// </summary>
|
|
public sealed class InSpaceConditionSystem : EntityConditionSystem<TransformComponent, InSpaceCondition>
|
|
{
|
|
protected override void Condition(Entity<TransformComponent> entity, ref EntityConditionEvent<InSpaceCondition> args)
|
|
{
|
|
args.Result = entity.Comp.GridUid == null;
|
|
}
|
|
}
|
|
|
|
|
|
/// <inheritdoc cref="EntityCondition"/>
|
|
public sealed partial class InSpaceCondition : EntityConditionBase<InSpaceCondition>
|
|
{
|
|
public override string EntityConditionGuidebookText(IPrototypeManager prototype) => String.Empty;
|
|
}
|