Table of Contents

Class BuildActionData

Namespace
MoonBark.GridPlacement.Core.Data
Assembly
MoonBark.GridPlacement.Core.dll

Core POCS implementation of BuildActionData for state management. Contains data about a build action for signal emission.

Ported from: godot/addons/grid_building/shared/data/build_action_data.gd

public class BuildActionData
Inheritance
BuildActionData
Inherited Members

Constructors

BuildActionData(Placeable?, PlacementReport?, BuildType)

Creates a new BuildActionData.

public BuildActionData(Placeable? placeable, PlacementReport? report, BuildType buildType)

Parameters

placeable Placeable

The placeable resource that was built

report PlacementReport

The placement report from the build operation

buildType BuildType

The type of build operation performed

Properties

BuildType

The type of build operation performed.

public BuildType BuildType { get; }

Property Value

BuildType

Placeable

The placeable resource that was built.

public Placeable? Placeable { get; }

Property Value

Placeable

Report

The placement report from the build operation.

public PlacementReport? Report { get; }

Property Value

PlacementReport

Timestamp

The timestamp when the action occurred.

public long Timestamp { get; }

Property Value

long

Methods

GetIssues()

Gets the issues from the report.

public List<string> GetIssues()

Returns

List<string>

List of issues, or empty if none

GetPlacedObject()

Gets the placed object from the report.

public Placeable? GetPlacedObject()

Returns

Placeable

The placed object, or null if not available

IsFailed()

Checks if the build action failed.

public bool IsFailed()

Returns

bool

True if failed, false otherwise

IsSuccessful()

Checks if the build action was successful.

public bool IsSuccessful()

Returns

bool

True if successful, false otherwise

ToString()

Gets a string representation of the build action.

public override string ToString()

Returns

string

String representation

ToVerboseString()

Gets a verbose string representation of the build action.

public string ToVerboseString()

Returns

string

Verbose string representation