PlacementRule
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
Base class for placement validation conditions.
Source File: addons/grid_building/placement/placement_rules/placement_rule.gd
Extends: GBResource
Private Properties
- Property:
_grid_targeting_state : [GridTargetingState](./grid-targeting-state/)(private) - Property:
_ready : bool = false(private) - Whether the rule is ready for use.
Constants
- Constant:
REASON_VIRTUAL : String = "This is a virtual condition function and should be implemented in a class that inherits from PlacementRule"
Public 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].
p_gts: GridTargetingState - 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
get_editor_issues
Returns an array of issues found during editor validation
get_runtime_issues
Returns an array of issues found during runtime validation
Private Methods
_to_string
Flags: private