Grid Placement

PlacementRule

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: placement/placement_rules/placement_rule.gd

Version: 5.0

class_name: PlacementRule extends: GBResource

Summary

Base class for placement validation conditions.

Signals

(none)

Exports

(none)

Methods

  • validate_placement()
    • Checks a set of shape casts for building validity and returns whether the condition has been met or not
  • setup()
    • The base function sets the grid targeting state for context which sources the target object being placed and the placer. Returns any issues found in the setup as an Array[String].[br][br] [code]p_gts[/code]: [i]GridTargetingState[/i] - Holds contextual state information for what is being targeted for placement and who is doing the placing
  • apply()
    • Optional code to be executed if this and all other tested rules validate successfully
  • tear_down()
    • Any cleanup code to run after the system changes preview instances or stops building Runs before the building system changes placeable preview
  • _to_string()
  • get_editor_issues()
    • Returns an array of issues found during editor validation
  • get_runtime_issues()
    • Returns an array of issues found during runtime validation