Skip to content

GBSystemsContext

Holds references to the systems used in grid building operations. This context allows for easy access to the systems without needing to pass them around manually. It is designed to be used with a GBCompositionContainer that resolves dependencies and provides the necessary systems.

signal building_system_changed( new_system: BuildingSystem )

Signal emitted when a system becomes available or is replaced.

signal grid_targeting_system_changed( new_system: GridTargetingSystem )
signal manipulation_system_changed( new_system: ManipulationSystem )
func _init( p_logger: GBLogger ) -> void
func get_building_system( ) -> BuildingSystem
func get_grid_targeting_system( ) -> GridTargetingSystem
func get_manipulation_system( ) -> ManipulationSystem
func set_system( system: GBSystem ) -> void

Sets the passed system as an active system within the context’s scope.

func get_editor_issues( ) -> Array[String]
func get_runtime_issues( p_checks: GBRuntimeChecks ) -> Array[String]

Returns a list of runtime issues found in the context. p_checks: GBRuntimeChecks - The runtime checks to perform

func _has_camera_2d_in_viewport( ) -> bool

Helper method to check if Camera2D is present in the current viewport

func _find_camera_2d_in_node( node: Node ) -> bool

Recursively search for Camera2D in a node tree

addons/grid_building/context/gb_systems_context.gd


This API reference is automatically generated from the plugin source code. For implementation examples and usage guides, see the guides section.