Object rule: every tile under the object must have the right TileSet custom data. Use it to allow building only on certain ground, such as "buildable" tiles. Set expected_tile_custom_data to the custom data names and values each tile must have, for example { "type": "ground", "variant": "grass" }. Add the rule to GridPlacementSettings.placement_rules for every object, or to an entry's own rules.
Source: addons/grid_placement/placement/placement_rules/template_rules/valid_placement_tile_rule.gd
Syntax
class ValidPlacementTileRule extends TileCheckRuleMembers
| Name | Kind | Summary |
|---|---|---|
expected_tile_custom_data | Property | Custom data names and the values each tile must have. |
settings | Property | Messages shown when the rule fails. Uses defaults when empty. |
setup | Method | |
validate_placement | Method | |
tear_down | Method | |
does_tile_have_valid_data | Method |