Explains one placement outcome in one place. Every surface that answers "why did this fail" renders from this function: the player action log, the console trace, and the headless trace CLI. One function means those surfaces cannot drift apart. The explanation is derived from the canonical PlacementLifecycleResult and the PlacementReport that carries it. It never changes placement state. Usage: var why := PlacementExplain.explain(host.get_last_dispatch_result()) print(why["human"]) # "Rejected: rule_validation (2 issues)" print(why["failed_rules"]) # [{rule_id = "collisions_check", issues = [...]}]
Source: addons/grid_placement/utils/placement_explain.gd
Syntax
class PlacementExplain extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
REASON_GUIDE | Field | Per-reason guidance. `next_step` says what to do, `where_to_look` names the files that own the behaviour, so an agent can act on the answer without grepping the tree. |
NO_DISPATCH_GUIDE | Field | Guidance for host sentinels that do not represent a terminal lifecycle result. These reasons must never be reported as caller cancellations. |
explain | Method | |
explain_lifecycle | Method | |
placer_evidence | Method | |
stamp_occupancy_conflict | Method | |
instance_id | Property | |
root | Property |