public CoreComponent(Session session, MyCubeBlock myCube, MyStringHash subtype)
        {
            Session     = session;
            MyCube      = myCube;
            Slim        = myCube.SlimBlock;
            SubtypeHash = subtype;

            MaxIntegrity = Slim.MaxIntegrity;

            var turret = MyCube as IMyLargeTurretBase;

            if (turret != null)
            {
                TurretBase = turret;
                TurretBase.EnableIdleRotation = false;
                BaseType = BlockType.Turret;
            }
            else if (MyCube is IMyConveyorSorter)
            {
                BaseType = BlockType.Sorter;
            }
            else
            {
                BaseType = BlockType.Fixed;
            }

            TerminalBlock   = myCube as IMyTerminalBlock;
            FunctionalBlock = myCube as IMyFunctionalBlock;

            BlockInventory = (MyInventory)MyCube.GetInventoryBase();
            SinkPower      = IdlePower;
            Platform       = session.PlatFormPool.Get();
            Platform.Setup(this);

            Monitors = new List <Action <long, int, ulong, long, Vector3D, bool> > [Platform.Weapons.Length];
            for (int i = 0; i < Monitors.Length; i++)
            {
                Monitors[i] = new List <Action <long, int, ulong, long, Vector3D, bool> >();
            }

            Data = new CompData(this);

            MyCube.OnClose += Session.CloseComps;
        }
 internal bool TryGetValidPlatform(out CorePlatform platform)
 {
     platform = GetPlatform();
     return(platform != null);
 }