Table of Contents

Class EntityReferenceCondition

Namespace
ElectricDrill.AstraRpgFramework.Conditions
Assembly
com.electricdrill.astra-rpg-framework.Runtime.dll

Condition that compares two entity slots resolved from the current EvaluationContext.

SameEntity and DifferentEntity use reference identity over resolved EntityCore instances and do not treat two missing entities as equal. Use the explicit null-check modes when absence is the desired predicate.

[Serializable]
[TypeSelectableMenu("Leaf/Entity")]
public class EntityReferenceCondition : Condition
Inheritance
object
EntityReferenceCondition

Properties

Comparison

The comparison applied to the two resolved entity slots.

public EntityReferenceComparisonMode Comparison { get; }

Property Value

EntityReferenceComparisonMode

Left

The left entity slot resolved from the evaluation context.

public ConditionTarget Left { get; }

Property Value

ConditionTarget

Right

The right entity slot resolved from the evaluation context.

public ConditionTarget Right { get; }

Property Value

ConditionTarget

Methods

Create(ConditionTarget, ConditionTarget, EntityReferenceComparisonMode)

Creates an EntityReferenceCondition with the supplied comparison settings.

public static EntityReferenceCondition Create(ConditionTarget left, ConditionTarget right, EntityReferenceComparisonMode comparison)

Parameters

left ConditionTarget
right ConditionTarget
comparison EntityReferenceComparisonMode

Returns

EntityReferenceCondition

Evaluate(EvaluationContext)

Evaluates this condition against the provided context.

public override bool Evaluate(EvaluationContext ctx)

Parameters

ctx EvaluationContext

Contextual data available to the condition (holder, performer, payload).

Returns

bool

true if the condition is satisfied; otherwise false.