Ejemplo n.º 1
0
 private void DelayedComps(bool forceRemove = false)
 {
     for (int i = CompsDelayed.Count - 1; i >= 0; i--)
     {
         var delayed = CompsDelayed[i];
         if (delayed.MyCube.MarkedForClose || delayed.Entity == null || forceRemove)
         {
             CompsDelayed.RemoveAtFast(i);
         }
         else if (delayed.MyCube.IsFunctional)
         {
             delayed.PlatformInit();
             CompsDelayed.RemoveAtFast(i);
         }
     }
 }
Ejemplo n.º 2
0
        private void DelayedComps(bool forceRemove = false)
        {
            for (int i = CompsDelayed.Count - 1; i >= 0; i--)
            {
                var delayed = CompsDelayed[i];
                if (forceRemove || delayed.Entity == null || delayed.Platform == null || delayed.MyCube.MarkedForClose || delayed.Platform.State != CorePlatform.PlatformState.Delay)
                {
                    if (delayed.Platform != null && delayed.Platform.State != CorePlatform.PlatformState.Delay)
                    {
                        Log.Line($"[DelayedComps skip due to platform != Delay] marked:{delayed.MyCube.MarkedForClose} - entityNull:{delayed.Entity == null} - force:{forceRemove}");
                    }

                    CompsDelayed.RemoveAtFast(i);
                }
                else if (delayed.MyCube.IsFunctional)
                {
                    delayed.PlatformInit();
                    CompsDelayed.RemoveAtFast(i);
                }
            }
        }