Local GRID surface projection of the 2D committed world: which node holds each (host_cell, host_slot, slot_index) stacking socket, and the mount each node was placed on. The PlacementWorldRegistry stays the shared authority for WHETHER a placement is legal; this registry is the per-socket index of WHICH node holds each slot, so validation can answer "is slot 2 of this table's surface taken?" in O(1) instead of scanning committed records. This is the 2D sibling of ObjectMountRegistry3D, and it carries the same relationship the 3D one applies between tops and edges: the host keeps its own cell occupancy while the stacked object lives in a separate slot table, so the two coexist instead of fighting over one key. Authority: nothing here decides legality. Callers validate through ObjectSurfaceValidation2D.can_place_on_surface() first; this registry only records and answers "who is there". That split is what keeps a registry bug from silently authorizing a placement.
Source: addons/grid_placement/systems/building/2d/object_surface_mount_registry_2d.gd
Syntax
class ObjectSurfaceMountRegistry2D extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
slots | Property | Slot key (PlacementMount2D.slot_key()) -> the node mounted there. |
placement_records | Property | Node -> the PlacementMount2D it was placed on. |
band_slots | Property | Band key (PlacementMount2D.band_key()) -> slot keys already taken in that height band. Lets the first-free-slot search skip occupied slots without walking every host. |
revision | Property | Incremented by every mutation, so cached validation can tell the state changed without re-querying. |
mount_of | Method | |
node_at | Method | |
register_surface_node | Method | |
key | Property | |
band | Property | |
taken | Property | |
release | Method | |
is_slot_occupied | Method | |
conflicts_with_other | Method | |
first_free_slot | Method | |
surface_nodes | Method | |
capture | Method | |
restore | Method | |
clear | Method |