Table of Contents

Struct ValidationCompletedEvent

Namespace
MoonBark.GridPlacement.Core.Events
Assembly
MoonBark.GridPlacement.Core.dll

Event raised when validation has been completed for an entity.

public readonly struct ValidationCompletedEvent : IEquatable<ValidationCompletedEvent>
Implements
Inherited Members

Constructors

ValidationCompletedEvent(int, bool, string?, CoreVector2I, int, bool)

public ValidationCompletedEvent(int entityId, bool isValid, string? reasonCode, CoreVector2I position, int placeableHash, bool isFinalValidation = false)

Parameters

entityId int
isValid bool
reasonCode string
position CoreVector2I
placeableHash int
isFinalValidation bool

Properties

EntityId

The entity ID that was validated.

public int EntityId { get; init; }

Property Value

int

IsFinalValidation

Whether this was a final validation triggered by confirm action. Used by PlacementInputBridge to determine if placement should proceed.

public bool IsFinalValidation { get; init; }

Property Value

bool

IsValid

Whether the validation passed.

public bool IsValid { get; init; }

Property Value

bool

PlaceableHash

The hash of the placeable that was validated.

public int PlaceableHash { get; init; }

Property Value

int

Position

The grid position that was validated.

public CoreVector2I Position { get; init; }

Property Value

CoreVector2I

ReasonCode

The validation reason code (null if valid).

public string? ReasonCode { get; init; }

Property Value

string

Methods

Equals(ValidationCompletedEvent)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ValidationCompletedEvent other)

Parameters

other ValidationCompletedEvent

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

Operators

operator ==(ValidationCompletedEvent, ValidationCompletedEvent)

public static bool operator ==(ValidationCompletedEvent left, ValidationCompletedEvent right)

Parameters

left ValidationCompletedEvent
right ValidationCompletedEvent

Returns

bool

operator !=(ValidationCompletedEvent, ValidationCompletedEvent)

public static bool operator !=(ValidationCompletedEvent left, ValidationCompletedEvent right)

Parameters

left ValidationCompletedEvent
right ValidationCompletedEvent

Returns

bool