mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +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
771 B
C#
21 lines
771 B
C#
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.EntityConditions.Conditions.Generic;
|
|
|
|
/// <summary>
|
|
/// Returns true if griduid and mapuid match (AKA on 'planet').
|
|
/// </summary>
|
|
public sealed class OnMapGridConditionSystem : EntityConditionSystem<TransformComponent, OnMapGridCondition>
|
|
{
|
|
protected override void Condition(Entity<TransformComponent> entity, ref EntityConditionEvent<OnMapGridCondition> args)
|
|
{
|
|
args.Result = entity.Comp.GridUid == entity.Comp.MapUid && entity.Comp.MapUid != null;
|
|
}
|
|
}
|
|
|
|
|
|
/// <inheritdoc cref="EntityCondition"/>
|
|
public sealed partial class OnMapGridCondition : EntityConditionBase<OnMapGridCondition>
|
|
{
|
|
public override string EntityConditionGuidebookText(IPrototypeManager prototype) => String.Empty;
|
|
}
|