public void Register(StellarSubroutine routine)
 {
     if (!setup)
     {
         init();
     }
     subRoutine = routine;
     cachedRoot = routine.cachedRoot;
     aiSystem   = routine.aiSystem;
     foreach (StellarNode child in Children)
     {
         child.Register(routine);
     }
 }
        public void SetRoot(StellarSystem system)
        {
            if (!setup)
            {
                init();
            }

            aiSystem   = system;
            cachedRoot = system.Root;
            foreach (StellarNode child in Children)
            {
                child.Register(this);
            }
        }