Legality of stacking a 2D object onto another object's surface. The decision authority for the SURFACE mount, split from [ObjectSurfaceMountRegistry2D] (which only records who holds each slot) so a registry bookkeeping bug can never authorize a placement. Two rejections, mirroring how 3D TOP reports its failures: [codeblock] SURFACE_OCCUPIED — another object already holds that slot SURFACE_TOO_HIGH — the band sits above the host's declared top surface [/codeblock] Every failure names the cell and slot, because a stacking rejection without coordinates is unactionable: the player cannot tell WHICH surface was full.
Source: addons/grid_placement/systems/building/2d/object_surface_validation_2d.gd
Syntax
class ObjectSurfaceValidation2D extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
MSG_SURFACE_OCCUPIED | Field | No host entry offers a surface at the targeted cell. The requested slot is already held by a committed object. The requested band is above the host's declared top surface. The host node is gone or invalid, so its declared surface cannot be trusted. Fails closed rather than inheriting an empty surface. Player-facing message for a rejection reason. Single source of truth so the activity log and the service tag cannot drift apart. |
MSG_NO_HOST_SURFACE | Field | |
MSG_HOST_UNAVAILABLE | Field | |
reason | Property | Verdict for one candidate surface mount. [member host_entry] is the host's [ScenePlacementEntry] (needed for its declared surface size) and [member host_node] the committed node holding it. One of [enum Reason]. NONE means the mount is legal. |
host_node | Property | The committed host node, or null when the rejection is about the host. |
message | Property | Human-readable reason with the offending cell and slot named. |
ok | Method | |
offers_surface | Method | |
host_slot_count | Method | |
max_host_band | Method | |
can_place_on_surface | Method | |
verdict | Property | |
resolved | Property | |
host_node | Property | |
host_entry | Property | |
pair | Property | |
pair | Property | |
first_free_mount | Method | |
band | Property | |
top_band | Property | |
width | Property | |
index | Property | |
found | Property |