Grid Placement

GBInjectorSystem

AUTO-GENERATED (GDScript) API entry

AUTO-GENERATED FILE — DO NOT EDIT MANUALLY

Source: systems/injection/gb_injector_system.gd

Version: 5.0

class_name: GBInjectorSystem extends: GBSystem

Signals

  • initial_injection_completed
    • Emit whenever a node is injected
    • Container services as the single source of truth for settings
    • within it’s scope for systems and other nodes concerned with grid building
    • operations. [br][br]
    • [b]Dependencies are injected out of this container by the GBInjectorSystem[/b]
    • Debug settings for logging and warnings.
    • Note: runtime validation is intentionally NOT auto-run on _ready() because
    • other game-level dependencies (GB level context, GBOwner, etc.) may not be
    • fully settled. Call run_validation() from your world/initializer script
    • after those dependencies are created and injected.
    • Root nodes for injection. These nodes and any children node added will
    • be injected by the GBInjectorSystem. Use this for scoping injection.
    • If left empty, all nodes in the scene tree will be injected.
    • Debug settings for logging and warnings.
  • node_injected(node: Node)
    • Container services as the single source of truth for settings
    • within it’s scope for systems and other nodes concerned with grid building
    • operations. [br][br]
    • [b]Dependencies are injected out of this container by the GBInjectorSystem[/b]
    • Debug settings for logging and warnings.
    • Note: runtime validation is intentionally NOT auto-run on _ready() because
    • other game-level dependencies (GB level context, GBOwner, etc.) may not be
    • fully settled. Call run_validation() from your world/initializer script
    • after those dependencies are created and injected.
    • Root nodes for injection. These nodes and any children node added will
    • be injected by the GBInjectorSystem. Use this for scoping injection.
    • If left empty, all nodes in the scene tree will be injected.
    • Debug settings for logging and warnings.
  • connections
  • if
  • if
  • if
  • if

Exports

  • composition_container
    • _logger = p_config.get_logger()
    • No validation call needed - injector handles it automatically

    • [i]Nodes that implement resolve_gb_dependencies(p_config: GBCompositionContainer)
    • will be injected automatically by this system.[/i]
  • injection_roots
    • container — it holds a reference to one and performs injection and validation.
    • Setup Requirements:
      • Assign a GBCompositionContainer resource to this injector
      • Ensure GBLevelContext and GBOwner are properly configured before
    • the injector runs (usually in _ready() methods)
      • The injector will automatically validate after injection and log any issues
    • Usage Example:
    • In your scene node:

    • func resolve_gb_dependencies(p_config: GBCompositionContainer) -> void:
    • _composition_container = p_config
    • _logger = p_config.get_logger()
    • No validation call needed - injector handles it automatically

    • [i]Nodes that implement resolve_gb_dependencies(p_config: GBCompositionContainer)
    • will be injected automatically by this system.[/i]

Methods

  • resolve_gb_dependencies(p_config: GBCompositionContainer) -> void
    • _composition_container = p_config
    • _logger = p_config.get_logger()
    • No validation call needed - injector handles it automatically

    • [i]Nodes that implement resolve_gb_dependencies(p_config: GBCompositionContainer)
    • will be injected automatically by this system.[/i]
  • _init(p_composition_container: GBCompositionContainer = null)
  • _ready
  • _initialize
  • get_injection_roots -> Array
    • Return the list of root nodes for injection
  • validate_runtime -> bool
    • Prefer the container’s runtime issues first (authoritative)
  • run_validation -> bool
  • get_editor_issues -> Array
  • get_runtime_issues -> Array
  • _inject_existing(p_node: Node) -> void
  • _on_node_added_to_scope(p_scope: Node, p_node: Node) -> void
  • create_with_injection(p_parent: Node, container: GBCompositionContainer) -> GBInjectorSystem
  • resolve_gb_dependencies(p_config: GBCompositionContainer) -> void
    • _composition_container = p_config
    • _logger = p_config.get_logger()
    • No validation call needed - injector handles it automatically

    • [i]Nodes that implement resolve_gb_dependencies(p_config: GBCompositionContainer)
    • will be injected automatically by this system.[/i]
  • inject_node(p_node: Node) -> bool
  • inject_recursive(p_node: Node) -> void
  • set_injection_meta(p_node: Node) -> void
  • remove_injection_meta(p_node: Node) -> void
  • _on_child_entered_tree(p_node: Node) -> void
    • Kept for backward compatibility if something still connects; prefer _on_node_added now
  • _on_node_exiting_tree(p_node: Node) -> void
  • _connect_child_entered_tree(p_node: Node) -> void
  • _disconnect_child_entered_tree(p_node: Node) -> void
  • _connect_tree_exiting(p_node: Node) -> void
  • _disconnect_tree_exiting(p_node: Node) -> void
  • _connect_scene_tree_node_added -> void
  • _on_scene_tree_node_added(p_node: Node) -> void
  • _validate_after_injection -> void
  • _report_warning(message: String) -> void