Shared node-keyed bookkeeping for the smooth occupancy registries. Owns the entry list, node identity lookups, freed-node pruning, snapshot and restore, and the projection rebuild from [member world_registry]. The dimension subclasses [SmoothOccupancyRegistry2D] and [SmoothOccupancyRegistry3D] own the geometry: entry records, world bounds, and the positive-area overlap test. Key design decisions:
- Occupancy is registered only after a successful commit.
- Failed placements create no registry record.
- Move operations exclude the object being moved (update in place).
- Demolish unregisters occupancy.
- Shared world: all entries are checked regardless of session. Split-screen players in the same world see each other's objects. Separate registries are for separate placement worlds only.
Source: addons/grid_placement/services/smooth_occupancy_registry.gd
Syntax
class SmoothOccupancyRegistry extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
placed_node | Property | One occupied footprint, keyed by a weak reference to its placed node. Weak reference to the placed node. Entries whose node was freed are pruned by [method SmoothOccupancyRegistry.clear_invalid_entries]. |
get_placed_node | Method | |
is_node | Method | |
copy_for | Method | |
to_record | Method | |
to_debug_record | Method | |
world_registry | Property | Shared committed-placement authority. [method rebuild_from_scene] reads only SMOOTH records it holds; save/load itself uses the restore coordinators. |
has_node | Method | |
unregister | Method | |
clear_invalid_entries | Method | |
clear_all | Method | |
size | Method | |
snapshot_state | Method | |
restore_state | Method | |
rebuild_from_scene | Method | |
debug_entries | Method |