BuildingSystem

BuildingSystem

Core building system that handles placement of objects in the game world. Pure C# implementation without Godot dependencies for unit testing. Responsibilities:

  • Manages preview creation and placement validation
  • Handles build actions and generates BuildActionData
  • Coordinates with placement validation system
  • Emits events for build success/failure Ported from: godot/addons/grid_building/systems/building/building_system.gd

Project: GridPlacement v6.0
Layer: Core
Source: Core/_incomplete/Systems/Placement/Building.cs/BuildingSystem.cs
Namespace: GridBuilding.Core.Systems.Building
Kind: class

Parsing Method: AST-based (Roslyn) - NOT regex

⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.

Properties

PlacedParent

The parent node where placed objects will be added.

Preview

The current preview instance.

BuildingState

The building state for tracking building operations.

PlacementContext

The placement context for validation.

Methods

SetPlacementContext

Sets the placement context for validation.

Returns: void

Parameters:

  • IPlacementContext context

SetPlacedParent

Sets the parent node for placed objects.

Returns: void

Parameters:

  • object parent

SetPreview

Sets the preview instance.

Returns: void

Parameters:

  • object preview

ExecutePlacement

Attempts to place the current preview object.

Returns: BuildActionData

Parameters:

  • object? placeable
  • BuildType buildType

GetRuntimeIssues

Validates the current placement setup.

Returns: List<string>