using Godot;
using AceFieldNewHorizon.Scripts.System;
using SimpleInjector;

namespace AceFieldNewHorizon.Scripts;

public partial class Root : Node
{
    public override void _Ready()
    {
        // Dependency Injection container is now initialized via AutoLoad (DIInitializer.cs).

        // Get references to the main system nodes from the scene tree
        // and inject their dependencies.
        // This assumes these nodes are direct children or easily accessible.
        // You might need to adjust paths based on your scene setup.

        // Example:
        // var resourceManager = GetNode<ResourceManager>("ResourceSystem"); // Assuming ResourceManager is a child of Root
        // DependencyInjection.Container.InjectProperties(resourceManager); // If ResourceManager had properties to inject

        // For now, we'll manually resolve and assign for the main system nodes.
        // The actual injection will happen in the _Ready methods of the system nodes themselves,
        // by resolving from the static container.
        // This is a common pattern when Godot instantiates the nodes.
    }
}
