AUTO-GENERATED FILE — DO NOT EDIT MANUALLY
Source: resources/gb_composition_container.gd
Version: 5.0
class_name: GBCompositionContainer
extends: GBResource
Signals
(none)
Exports
config: GBConfig- user-visible settings, templates, rules, and runtime checks used by the
- systems.
- Create and assign a
GBLevelContextand aGBOwnerin your scene, then
- Create and assign a
- ensure they are wired into the container’s contexts (usually via the
- injector). The
GBLevelContextprovides tilemap / tilelayer lookup and - spatial context required for placement and targeting. The
GBOwner - identifies who is responsible for performing operations (a player or
- simulated actor) and is required by many systems.
- Validation workflow:
- Ensure the level is loaded and the
GBLevelContextand aGBOwner
- Ensure the level is loaded and the
- instance are created and assigned to the container’s contexts.
- The
GBInjectorSystemautomatically validates the complete setup after
- The
- dependency injection is complete. Any issues are logged via the container’s
- logger system.
- For manual validation, call
composition_container.get_runtime_issues()
- For manual validation, call
- to collect diagnostics, or
composition_container.validate_runtime()to - get a boolean result.
- Note: The injector (
GBInjectorSystem) handles both dependency injection - and automatic validation. No manual validation calls are required in most
- cases.
Methods
get_contexts -> GBContextsget_states -> GBStatesget_logger -> GBLoggerget_mode_state -> ModeStateget_targeting_state -> GridTargetingStateget_building_state -> BuildingStateget_manipulation_state -> ManipulationStateget_settings -> GBSettings- Use the logger (get_logger creates a fallback) and fail-fast on missing config
get_placement_rules -> Array_log_placement_rules_summary(rules: Array) -> void- Use the container’s logger if available so debug/browse tools can attach to it
get_visual_settings -> GBVisualSettingsget_systems_context -> GBSystemsContextget_manipulation_settings -> ManipulationSettingsget_runtime_checks -> GBRuntimeChecksget_templates -> GBTemplatesget_indicator_context -> IndicatorContextget_actions -> GBActionsget_debug_settings -> GBDebugSettingsget_editor_issues -> Array- Delegate to the centralized validator using this instance and its logger
get_runtime_issues -> Arraylog_runtime_issues -> Arrayvalidate_editor -> boolvalidate_runtime -> bool_get_debug_settings_for_logger -> GBDebugSettings