Scene-free brush lifecycle coordinator. Extracted from PlacementSystem (P4 god-class refactor) to give the brush coordination concern its own single-responsibility home. Owns the [BrushState] instance (so PlacementSystem no longer holds it directly) and coordinates the start/complete/anchor/commit/cancel/paint sequence for terrain brushes. Mirrors the pattern of [TerrainPlacementService2D] (instance + configure) and [PlacementInputHandler] (instance + configure) so the brush behavior is swappable per-game by subclassing. Signal emission is intentionally NOT done here — the coordinator returns a [PlacementReport] for every paint attempt, and PlacementSystem's thin delegator emits the appropriate success/failed signal. This keeps the coordinator pure (no side effects beyond state mutation in [BrushState]). Usage: var coord := BrushCoordinator.new() coord.configure(states, terrain_service) coord.set_brush_shape(PlacementEnums.ObjectTool.LINE) coord.start_terrain_brush_drag() var report := coord.complete_terrain_brush()
Source: addons/grid_placement/systems/building/components/brush_coordinator.gd
Syntax
class BrushCoordinator extends BrushServiceContractMembers
| Name | Kind | Summary |
|---|---|---|
brush_state | Property | The brush state this coordinator owns. Exposed for [PlacementInputHandler], which needs to read [member BrushState.is_terrain_dragging] etc. to resolve InputIntents. |
configure | Method | |
set_states | Method | |
set_brush_shape | Method | |
start_terrain_brush_drag | Method | |
positioner | Property | |
target_map | Property | |
cell | Property | |
complete_terrain_brush | Method | |
complete_terrain_brush_dry | Method | |
positioner | Property | |
target_map | Property | |
current_cell | Property | |
cells | Property | |
complete_terrain_brush_immediate | Method | |
target_map | Property | |
positioner | Property | |
complete_terrain_drag_only | Method | |
anchor_pending_terrain | Method | |
target_map | Property | |
positioner | Property | |
anchor_cell | Property | |
cells | Property | |
commit_pending | Method | |
cells | Property | |
cancel_pending | Method | |
start_object_line_drag | Method | |
complete_object_line_drag | Method | |
is_object_line_dragging | Method | |
cancel_all | Method | |
is_terrain_dragging | Method | |
is_pending | Method | |
get_brush_shape | Method | |
get_drag_start | Method | |
get_pending_cells | Method | |
get_object_line_drag_start | Method | |
get_brush_state | Method | |
paint_with_current_brush | Method | |
terrain_name | Property | |
target_map | Property | |
target_map | Property | |
positioner | Property | |
current_cell | Property | |
cells | Property | |
f_ctx | Property | |
set_terrain_context | Method | |
supported_dimensions | Method | |
get_runtime_issues | Method | |
set_session_brush_state | Method |
Source
addons/grid_placement/systems/building/components/brush_coordinator.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs