Table of Contents

Class GBSystemsContext

Namespace
GridPlacement.GDScript
Assembly
MoonBark.GridPlacement.GDScript.dll

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 PlacementContainer that resolves dependencies and provides the necessary systems.

class GBSystemsContext extends RefCounted
GBSystemsContext

Fields

PlacementSystem

Preload system classes to ensure they are registered before type resolution

const PlacementSystem = preload("res://addons/grid_building/systems/building/building_system.gd")

GridTargetingSystem

const GridTargetingSystem = preload("res://addons/grid_building/systems/grid_targeting/grid_targeting_system.gd")

ManipulationSystem

const ManipulationSystem = preload("res://addons/grid_building/systems/manipulation/manipulation_system.gd")

Properties

issues

var issues: Array[String] = []

issues

var issues: Array[String] = []

viewport

var viewport: Viewport = null

scene_tree

var scene_tree = Engine.get_singleton("SceneTree") as SceneTree

Methods

get_building_system

func get_building_system() -> PlacementSystem:

Returns

get_grid_targeting_system

func get_grid_targeting_system() -> GridTargetingSystem:

Returns

get_manipulation_system

func get_manipulation_system() -> ManipulationSystem:

Returns

set_system

func set_system(system: GBSystem) -> void:

Parameters

system

Returns

get_editor_issues

func get_editor_issues() -> Array[String]:

Returns

get_runtime_issues

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

Parameters

p_checks

Returns

Events

building_system_changed

Signal emitted when a system becomes available or is replaced.

signal building_system_changed(new_system: PlacementSystem)

grid_targeting_system_changed

signal grid_targeting_system_changed(new_system: GridTargetingSystem)

manipulation_system_changed

signal manipulation_system_changed(new_system: ManipulationSystem)