PlacementReport
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Comprehensive report for placement operation results and validation feedback.
Source File: addons/grid_building/placement/manager/placement_report.gd
Properties
Property:
placer : [GBOwner](./gb-owner/)GBOwner for the root entity responsible for placing the preview_instance into the game world. This represents the player, AI, or other entity that initiated the placement action.
Property:
preview_instance : NodeThe preview instance for the object being manipulated (built, placed, etc.). This is the Node2D that represents the object being tested for placement validity.
Property:
placed : NodeThe root of the placed object (if any). This should be set after successful placement
Property:
indicators_report : [IndicatorSetupReport](./indicator-setup-report/)The report from RuleCheckIndicator generation for the preview object. Contains detailed information about collision detection, rule validation, and indicator setup.
Property:
action_type : [GBEnums](./gb-enums/).ActionThe type of action that was attempted for this placement. Indicates whether this was a BUILD, MOVE, or other type of placement operation.
Property:
issues : Array[String] = []General setup issues encountered during the placement attempt. Contains error messages and validation failures that prevented successful placement.
Property:
notes : Array[String] = []Additional notes collected at setup time (aggregated from indicator reports and validator). Contains diagnostic information and metadata about the placement process.
Public Methods
add_issue
Adds an issue to the report’s issues list.
Issues represent problems or validation failures that occurred during placement.
p_issue The issue message to add to the report
add_note
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.
p_note The diagnostic note to add to the report
get_owner_root
Returns the root node of the entity responsible for placement.
This is a convenience method that accesses the owner_root property of the placer.
[return] The root Node of the GBOwner entity, or null if no placer is set
to_verbose_string
Converts the report to a detailed multi-line string representation.
Generates a comprehensive string containing all report information including success status, action type, preview details, indicator report summary, issues, and notes. Useful for debugging and logging.
[return] A formatted string representation of the entire report
is_successful
Determines if the placement attempt was successful.
A placement is considered successful if there are no issues in either the main report or the indicators report.
[return] true if placement was successful, false otherwise
get_issues
Returns all issues from both the main report and indicators report.
Combines issues from the report’s own issues array with any issues found in the indicators report, providing a complete list of all problems encountered during the placement attempt.
[return] An array containing all issues from the report and indicators
from_failed_validation
Flags: static
Factory: build a PlacementReport from validation issue dictionary Builds a PlacementReport using the owning GBOwner (not the owner_root Node)
Private Methods
_init
Flags: private
Creates a new PlacementReport with the specified parameters.
p_placer The GBOwner entity responsible for the placement action
p_preview_instance The Node2D being tested for placement
p_indicators_report The IndicatorSetupReport containing validation results
p_action The type of placement action being performed