Chris' Tutorials
Docs/Grid Placement

Class

IdRegistry

Generated GDScript class reference for GridPlacement.IdRegistry.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

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

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.

Central, type-safe registry of declared ids (6.0.0). Replaces per-service allowlists ("lean whitelists") with a single static service that catches "wodo"-vs-"wood" typos at LOAD time rather than at the silent-miss point of use. Loaders (placement_catalog, terrain_palette, settings) call [method register] during their _init / load path; spend rules call [method assert_known] / [method is_known] before removing ids from a provider. Domain-namespace surface: every id is registered against a domain constant ([constant DOMAIN_RESOURCES], [constant DOMAIN_MATERIALS], etc.). This lets wodo collide against wood inside the same materials table while keeping terrain_dungeon clearly distinct from refund_kind_dungeon. Scene-free. RefCounted-extension is only nominal (GDScript requires it for [code]class_name[/code]) — usage is fully static. No teardown wiring needed; [method clear_all] is available for test cleanup.

Source: addons/grid_placement/services/id_registry.gd

Syntax

class IdRegistry extends RefCounted

Members

NameKindSummary
DOMAIN_RESOURCESFieldObject/scene/spend-rule id domain.
DOMAIN_MATERIALSFieldMaterial/id-keyed-inventory id domain (catches misnamed strings like "wodo" vs "wood" before they silently miss in the provider).
DOMAIN_TERRAINFieldTerrain name domain (from TileSet / [TerrainPalette]).
DOMAIN_REFUNDERSFieldRefunder kind domain (5.1-D refund contract).
DOMAIN_ACTIONSFieldAction name domain ([PlacementActions]).
registerMethod
domain_dictProperty
was_newProperty
is_knownMethod
assert_knownMethod
get_dataMethod
clearMethod
clear_allMethod
countMethod

Source

addons/grid_placement/services/id_registry.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs