Esempio n. 1
0
        public Program()
        {
            MyProperty = new KProperty(this);
            MyProperty.Load();
            drawingSurface             = Me.GetSurface(0);
            drawingSurface.ContentType = ContentType.TEXT_AND_IMAGE;
            Runtime.UpdateFrequency    = UpdateFrequency.Update100;

            lat_stators = BlockSystem <IMyMotorStator> .SearchByName(this, MyProperty.Name);

            if (!lat_stators.IsEmpty)
            {
                lon_stators = BlockSystem <IMyMotorStator> .SearchByGrid(this, lat_stators.First.Top.CubeGrid);

                solar_panels = new BlockSystem <IMySolarPanel>();
                foreach (IMyMotorStator lon_stator in lon_stators.List)
                {
                    solar_panels.Merge(BlockSystem <IMySolarPanel> .SearchByGrid(this, lon_stator.Top.CubeGrid));
                }
            }
        }