Skip to content
ct

Class

AdjacencyRequiredRule

Generated GDScript class reference for GridPlacement.AdjacencyRequiredRule.

Status
Draft
Version
v6.0
Updated
Development docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Rule that requires a tile paint action to be adjacent to a matching neighbor.

Source: addons/grid_placement/placement/placement_rules/template_rules/adjacency_required_rule.gd

Syntax

class AdjacencyRequiredRule extends TilePaintRule

Members

NameKindSummary
match_terrain_namePropertyThe terrain name to match against neighbors. If empty, matches the current terrain being placed.
require_horizontalPropertyIf true, requires a horizontal neighbor (left or right).
require_verticalPropertyIf true, requires a vertical neighbor (up or down).
min_neighborsPropertyMinimum number of matching neighbors required. If require_horizontal is true, this applies to the horizontal set. If require_vertical is true, this applies to the vertical set. If BOTH are true, the tile must have at least one neighbor in BOTH directions (forming a 2x2 corner/segment).
include_diagonalPropertyWhether to include diagonal neighbors in the search.
error_messagePropertyDescriptive error message to show when validation fails.
validate_cellMethod
terrain_to_matchProperty
horiz_countProperty
vert_countProperty
diag_countProperty
total_countProperty