PlacementReport
PlacementReport
Core POCS implementation of PlacementReport for state management. Report generated for a placement action outcome. Encapsulates all relevant information about a placement attempt including the entity performing the action, the object being placed, validation results, and any issues or notes encountered during the process. Ported from: godot/addons/grid_building/systems/placement/validators/placement_rules/placement_report.gd
Project: GridPlacement v6.0
Layer: Core
Source: Core/Systems/Data/PlacementReport.cs
Namespace: GridBuilding.Core.Data
Kind: class
Parsing Method: AST-based (Roslyn) - NOT regex
⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.
Properties
Placer
Owner for the root entity responsible for placing the preview_instance into the game world.
PreviewInstance
The preview instance for the object being manipulated (built, placed, etc.).
Placed
The placed instance representing the object successfully placed into the game world. This is different from preview_instance - preview shows where object WILL be placed, while placed is the actual object instance that WAS placed.
IndicatorsReport
The report from RuleCheckIndicator generation for the preview object.
ActionType
The type of action that was attempted for this placement.
Issues
General setup issues encountered during placement.
Notes
Additional diagnostic notes collected at setup time.
Methods
AddIssue
Adds an issue to the report’s issues list. Issues represent problems or validation failures that occurred during placement.
Returns: void
Parameters:
string issue
AddNote
Adds a diagnostic note to the report’s notes list. Notes contain additional information about the placement process that may be useful for debugging or logging, but don’t represent errors.
Returns: void
Parameters:
string note
GetPlacerRoot
Returns the root node of the entity responsible for placement.
Returns: object?
IsSuccessful
Checks if the placement was successful (no issues or validation failures).
Returns: bool
IsFailed
Checks if the placement failed.
Returns: bool
GetIssues
Returns all issues associated with this placement attempt, including any indicator validation failures collected in the associated IndicatorSetupReport.
Returns: List<string>
ToVerboseString
Converts the report to a verbose string representation for debugging.
Returns: string
FromFailedValidation
Creates a PlacementReport for failed validation scenarios. Static factory method that builds a failed report with validation issues.
Returns: PlacementReport
Parameters:
Dictionary<object, List<object>> validatorIssuesIOwner ownerPlaceable previewInstance