PlacementReport
Factory: build a PlacementReport from...
Factory: build a PlacementReport from validation issue dictionary Builds a PlacementReport using the owning GBOwner (not the owner_root Node)
Version: v5.0.0
Inherits: RefCounted
Source: placement_report.gd
Parsing: AST-based for maximum accuracy with symbol typing
Variables
placer: GBOwner
This represents the player, AI, or other entity that initiated the placement action.
Type: GBOwner
preview_instance: Node
This is the Node2D that represents the object being tested for placement validity.
Type: Node
placed: Node
This should be set after successful placement
Type: Node
indicators_report: IndicatorSetupReport
Contains detailed information about collision detection, rule validation, and indicator setup.
Type: IndicatorSetupReport
action_type: GBEnums.Action
Indicates whether this was a BUILD, MOVE, or other type of placement operation.
Type: GBEnums.Action
issues: Array[String]
Contains error messages and validation failures that prevented successful placement.
Type: Array[String]
Default: []
notes: Array[String]
Contains diagnostic information and metadata about the placement process.
Type: Array[String]
Default: []
Methods
_init
Signature: _init(p_placer : GBOwner: Variant, p_preview_instance : Node: Variant, p_indicators_report : IndicatorSetupReport: Variant, p_action : GBEnums.Action: Variant) -> void
[param p_action] The type of placement action being performed [br]
Returns: void
Parameters:
p_placer : GBOwner: Variantp_preview_instance : Node: Variantp_indicators_report : IndicatorSetupReport: Variantp_action : GBEnums.Action: Variant
add_issue
Signature: add_issue(p_issue : String: Variant) -> void
[param p_issue] The issue message to add to the report
Returns: void
Parameters:
p_issue : String: Variant
add_note
Signature: add_note(p_note : String: Variant) -> void
[param p_note] The diagnostic note to add to the report
Returns: void
Parameters:
p_note : String: Variant
get_owner_root
Signature: get_owner_root() -> Node
[return] The root Node of the GBOwner entity, or null if no placer is set
Returns: Node
to_verbose_string
Signature: to_verbose_string() -> String
[return] A formatted string representation of the entire report
Returns: String
is_successful
Signature: is_successful() -> bool
[return] true if placement was successful, false otherwise
Returns: bool
get_issues
Signature: get_issues() -> Array
[return] An array containing all issues from the report and indicators
Returns: Array
from_failed_validation
Signature: static from_failed_validation(validator_issues: Dictionary, owner: GBOwner, target: Node, action: GBEnums.Action = GBEnums.Action.BUILD: Variant) -> PlacementReport
Builds a PlacementReport using the owning GBOwner (not the owner_root Node)
Returns: PlacementReport
Static: true
Parameters:
validator_issues: Dictionaryowner: GBOwnertarget: Nodeaction: GBEnums.Action = GBEnums.Action.BUILD: Variant