Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.
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 TilePaintRuleMembers
| Name | Kind | Summary |
|---|---|---|
match_terrain_name | Property | The terrain name to match against neighbors. If empty, matches the current terrain being placed. |
require_horizontal | Property | If true, requires a horizontal neighbor (left or right). |
require_vertical | Property | If true, requires a vertical neighbor (up or down). |
min_neighbors | Property | Minimum 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_diagonal | Property | Whether to include diagonal neighbors in the search. |
error_message | Property | Descriptive error message to show when validation fails. |
validate_cell | Method | |
terrain_to_match | Property | |
horiz_count | Property | |
vert_count | Property | |
diag_count | Property | |
total_count | Property |
Source
addons/grid_placement/placement/placement_rules/template_rules/adjacency_required_rule.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs