PlacementRule

Returns an array of issues found during runtime validation

sort Weight: 10

Returns an array of issues found during runtime validation

Version: v5.0.0

STABLE

Inherits: GBResource
Source: placement_rule.gd
Parsing: AST-based for maximum accuracy with symbol typing


Constants

REASON_VIRTUAL

Type: String

Value: "This is a virtual condition function and should be implemented in a class that inherits from PlacementRule"


Variables

_grid_targeting_state: GridTargetingState

Type: GridTargetingState


_ready: bool

Whether the rule is ready for use.

Type: bool

Default: false


Methods

validate_placement

Signature: validate_placement() -> RuleResult

returns whether the condition has been met or not

Returns: RuleResult


setup

Signature: setup(p_gts : GridTargetingState: Variant) -> Array

p_gts: GridTargetingState - Holds contextual state information for what is being targeted for placement and who is doing the placing

Returns: Array

Parameters:

  • p_gts : GridTargetingState: Variant

apply

Signature: apply() -> Array

Optional code to be executed if this and all other tested rules validate successfully

Returns: Array


tear_down

Signature: tear_down() -> void

Runs before the building system changes placeable preview

Returns: void


_to_string

Signature: _to_string() -> String

Returns: String


get_editor_issues

Signature: get_editor_issues() -> Array

Returns an array of issues found during editor validation

Returns: Array


get_runtime_issues

Signature: get_runtime_issues() -> Array

Returns an array of issues found during runtime validation

Returns: Array