Skip to content

Class

ObjectPlacementService

Generated GDScript class reference for GridPlacement.ObjectPlacementService.

Status
Draft
Version
v6.0
Updated
Development docs generated from GDScript source

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

Scene-free object placement service. Owns the object build/place flow without requiring a scene node. Wraps [PlacementBuildOrchestrator.run_build] directly so host-path object placement is scene-free. Lifecycle: [codeblock] var service := ObjectPlacementService.new() service.configure(states, settings, indicator_context) service.create_preview(placeable) var report := service.try_build(placeable, PlacementEnums.PlacementType.SINGLE) service.clear_preview() [/codeblock] Hosted by [GridPlacementHost] via [PlacementServiceGroup].

Source: addons/grid_placement/services/object_placement_service.gd

Syntax

class ObjectPlacementService extends RefCounted

Members

NameKindSummary
cellsPropertyResult of [method simulate_ordered_cells]: the accepted cells in commit order and their world footprint rects (parallel arrays).
rectsProperty
cappedPropertyTrue when the placement cap or a work budget stopped the scan with input cells still unconsidered.
scannedPropertyCells iterated.
validatedPropertySeats fully rule-validated.
tilesPropertySeat-relative collision tiles plus the seat they were measured at.
seatProperty
placeablePropertyVerdict on one ordered-sim candidate seat. Per-run invariants and state of [method simulate_ordered_cells].
mapProperty
previewProperty
managerProperty
anchor_modeProperty
footprintProperty
relative_tilesProperty
measure_seatProperty
tile_overlapProperty
committed_tilesProperty
can_validateProperty
entry_ignoreProperty
profile_ignoreProperty
live_rotationProperty
anchor_offsetProperty
setup_doneProperty
accepted_unionPropertyTiles taken by accepted seats (tile-overlap maps only).
SERVICE_NAMEFieldSSOT for this service's gameplay-facing issue messages. Both the service and its tests reference these constants so the player-facing text and the service tag never drift apart.
MSG_INDICATOR_MANAGER_MISSINGField
SIM_MIN_VALIDATIONSFieldOrdered-sim work budgets (see [method simulate_ordered_cells]). A run validates at most SIM_MAX_VALIDATIONS seats and iterates at most maxi(SIM_MIN_SCANNED, validations SIM_SCANNED_PER_VALIDATION) cells, where validations = mini(SIM_MAX_VALIDATIONS, maxi(SIM_MIN_VALIDATIONS, cap SIM_VALIDATIONS_PER_PLACEMENT)) and cap is the placement cap (or the default drag budget when uncapped). The floor covers dense legit gestures with margin (a 60x60 smithy drag needs ~276 validations for 7 accepts); the ceiling bounds hostile fields. Deterministic counts, so preview and commit truncate identically.
SIM_VALIDATIONS_PER_PLACEMENTField
SIM_MAX_VALIDATIONSField
SIM_MIN_SCANNEDField
SIM_SCANNED_PER_VALIDATIONField
set_preview_diagnostic_sinkMethod
configureMethod
set_world_registryMethod
get_surface_registryMethod
set_surface_registryMethod
get_preview_surface_mountMethod
set_statesMethod
disposeMethod
get_runtime_issuesMethod
create_previewMethod
get_previewMethod
get_last_reportMethod
clear_previewMethod
try_buildMethod
managerProperty
missing_reportProperty
active_previewProperty
missingProperty
seat_mapProperty
has_poseProperty
pose_degreesProperty
rigProperty
rig_transformProperty
rig_logical_degreesProperty
preview_rotationProperty
builtProperty
managerProperty
preview_localProperty
surface_resolvedProperty
surface_issuesProperty
surface_reportProperty
surface_mountProperty
anchor_modeProperty
entry_ignoreProperty
profile_ignoreProperty
authority_reportProperty
ctxProperty
simulate_ordered_cellsMethod
simProperty
runProperty
effective_capProperty
validation_budgetProperty
scan_budgetProperty
saved_localProperty
saved_projectionProperty
cappedProperty
candidatesProperty
retry_cellsProperty
accepted_beforeProperty