Skip to content

Class

AdjacencyRequiredRule

Generated GDScript class reference for GridPlacement.AdjacencyRequiredRule.

Status
Current
Version
v6.0
Source updated
Active v6.0 guide line from Grid Placement repo
Generated on
2026-09-01

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