Skip to content

Class

ObjectSurfaceMountRegistry2D

Generated GDScript class reference for GridPlacement.ObjectSurfaceMountRegistry2D.

Status
Current
Version
v6.2.1
Source updated
2026-09-24
Generated on
2026-10-22

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 RefCounted

Members

NameKindSummary
slotsPropertySlot key (PlacementMount2D.slot_key()) -> the node mounted there.
placement_recordsPropertyNode -> the PlacementMount2D it was placed on.
band_slotsPropertyBand 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.
revisionPropertyIncremented by every mutation, so cached validation can tell the state changed without re-querying.
mount_ofMethod
node_atMethod
register_surface_nodeMethod
keyProperty
bandProperty
takenProperty
releaseMethod
is_slot_occupiedMethod
conflicts_with_otherMethod
first_free_slotMethod
surface_nodesMethod
captureMethod
restoreMethod
clearMethod