Exemple #1
0
        private void Init()
        {
            MyProperty = new KProperty(this);
            MyProperty.Load();
            Stage          = 0;
            bottom_pistons = BlockSystem <IMyPistonBase> .SearchByGroup(this, "Foreuse Bottom Pistons");

            bottom_pistons.ForEach(delegate(IMyPistonBase block) {
                block.MinLimit = MyProperty.locker_position_min;
                block.MaxLimit = MyProperty.locker_position_max;
            });
            bottom_mergers = BlockSystem <IMyShipMergeBlock> .SearchByGroup(this, "Foreuse Bottom Mergers");

            top_pistons = BlockSystem <IMyPistonBase> .SearchByGroup(this, "Foreuse Top Pistons");

            top_pistons.ForEach(delegate(IMyPistonBase block) {
                block.MinLimit = MyProperty.locker_position_min;
                block.MaxLimit = MyProperty.locker_position_max;
            });
            top_mergers = BlockSystem <IMyShipMergeBlock> .SearchByGroup(this, "Foreuse Top Mergers");

            connector = BlockSystem <IMyShipConnector> .SearchByName(this, "Foreuse Connector Drills");

            levage_pistons = BlockSystem <IMyPistonBase> .SearchByGroup(this, "Foreuse Levage Pistons");

            levage_pistons.ForEach(delegate(IMyPistonBase block) {
                block.MinLimit = MyProperty.elevator_position_min;
                block.MaxLimit = MyProperty.elevator_position_max;
            });

            grinder_stator = BlockSystem <IMyMotorStator> .SearchByName(this, "Foreuse Grinder Stator");

            grinders = BlockSystem <IMyShipGrinder> .SearchByGroup(this, "Foreuse Grinders");

            welder_stator = BlockSystem <IMyMotorStator> .SearchByName(this, "Foreuse Welder Stator");

            welders = BlockSystem <IMyShipWelder> .SearchByGroup(this, "Foreuse Welders");

            projector = BlockSystem <IMyProjector> .SearchByName(this, "Foreuse Projector Drill");

            light = BlockSystem <IMyLightingBlock> .SearchByGroup(this, "Foreuse Rotating Light");

            drills = BlockSystem <IMyShipDrill> .SearchByGroup(this, "Foreuse Drills");

            control_lcds = BlockSystem <IMyTextPanel> .SearchByName(this, "Foreuse Control LCD");

            control_lcds.ForEach(delegate(IMyTextPanel block)
            {
                block.ContentType = ContentType.TEXT_AND_IMAGE;
            });

            SequenceBlocks = new List <int>()
            {
            };
        }
Exemple #2
0
            private void Search()
            {
                cockpit = BlockSystem <IMyCockpit> .SearchBlocks(DisplayLcd.program);

                thrusts_up = BlockSystem <IMyThrust> .SearchByGroup(DisplayLcd.program, "Thrusters Up");

                thrusts_down = BlockSystem <IMyThrust> .SearchByGroup(DisplayLcd.program, "Thrusters Down");

                thrusts_left = BlockSystem <IMyThrust> .SearchByGroup(DisplayLcd.program, "Thrusters Left");

                thrusts_right = BlockSystem <IMyThrust> .SearchByGroup(DisplayLcd.program, "Thrusters Right");

                thrusts_forward = BlockSystem <IMyThrust> .SearchByGroup(DisplayLcd.program, "Thrusters Forward");

                thrusts_backward = BlockSystem <IMyThrust> .SearchByGroup(DisplayLcd.program, "Thrusters Backward");

                search = false;
            }