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.
A rule that validates placement is within the boundaries of a tilemap. This rule works by checking if a tile exists at a proposed placement position on the target TileMapLayer. It ensures that a player or system cannot place objects in empty, unmapped areas of the scene. Behavior:
- The rule passes if every indicator is positioned over a cell that has an assigned
TileDataobject on the target map. - The rule fails if any indicator is over a cell that returns
nullforTileData, indicating that the cell is outside of the mapped region. Usage: - Attach this rule to a PlacementContainer for context wide injection OR a ScenePlacementEntry for placeable specific rule evaluation
- The
GridTargetingStatemust provide a validTileMapLayerfor the rule to check against.
Source: addons/grid_placement/placement/placement_rules/template_rules/within_tilemap_bounds_rule.gd
Syntax
class WithinTilemapBoundsRule extends TileCheckRuleMembers
| Name | Kind | Summary |
|---|---|---|
success_message | Property | Success message for valid placement. |
failed_message | Property | Failure message for out-of-bounds placement. |
no_indicators_message | Property | |
enable_debug_diagnostics | Property | Optional: enable extra per-indicator diagnostics during tile lookups (very verbose) |
NON_CRITICAL_ISSUE_KEYWORDS | Field | Issue keywords considered non-critical for bounds checking (cosmetic/setup) |
setup | Method | |
tear_down | Method | |
validate_placement | Method | |
failing_indicators | Property | |
get_failing_indicators | Method | |
failing_indicators | Property | |
target_map | Property | |
results | Property | |
results | Property | |
indicator_issues | Property | |
critical_issues | Property | |
local_pos | Property | |
tile_under | Property | |
cell_data | Property | |
critical | Property |
Source
addons/grid_placement/placement/placement_rules/template_rules/within_tilemap_bounds_rule.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs