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
placeablePlaceableThe placeable resource that was built
reportPlacementReportThe placement report from the build operation
buildTypeBuildTypeThe type of build operation performed
Properties
BuildType
The type of build operation performed.
public BuildType BuildType { get; }
Property Value
Placeable
The placeable resource that was built.
public Placeable? Placeable { get; }
Property Value
Report
The placement report from the build operation.
public PlacementReport? Report { get; }
Property Value
Timestamp
The timestamp when the action occurred.
public long Timestamp { get; }
Property Value
Methods
GetIssues()
Gets the issues from the report.
public List<string> GetIssues()
Returns
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