public void GoIdle()
 {
     if (!IdleRoutine)
     {
         return;
     }
     ActiveRoutine = IdleRoutine;
 }         // switches to the idle subroutine
 public void Register(StellarSubroutine routine)
 {
     if (!setup)
     {
         init();
     }
     subRoutine = routine;
     cachedRoot = routine.cachedRoot;
     aiSystem   = routine.aiSystem;
     foreach (StellarNode child in Children)
     {
         child.Register(routine);
     }
 }
        }         // switches to the idle subroutine

        public void HandleQvent(Qvent qvent)
        {
            // Gonna need some complex event handling logic...
            if (Triggers.ContainsKey(qvent.QventType))
            {
                if (ActiveProcess)
                {
                    ActiveProcess.OnInterrupt();
                }

                StellarSubroutine result = Triggers [qvent.QventType];
                Triggers [qvent.QventType].HandleQvent(qvent);
            }
        }