Ejemplo n.º 1
0
            private void Search()
            {
                BlockFilter <IMyProductionBlock> block_filter = BlockFilter <IMyProductionBlock> .Create(DisplayLcd.lcd, filter);

                producers = BlockSystem <IMyProductionBlock> .SearchByFilter(DisplayLcd.program, block_filter);

                search = false;
            }
Ejemplo n.º 2
0
        private void Search()
        {
            BlockFilter <IMyTextPanel> block_filter = BlockFilter <IMyTextPanel> .Create(Me, MyProperty.lcd_filter);

            lcds = BlockSystem <IMyTextPanel> .SearchByFilter(this, block_filter);

            search = false;
        }
Ejemplo n.º 3
0
            private void Search()
            {
                BlockFilter <IMyShipDrill> block_filter = BlockFilter <IMyShipDrill> .Create(DisplayLcd.lcd, filter);

                drill_inventories = BlockSystem <IMyShipDrill> .SearchByFilter(DisplayLcd.program, block_filter);

                search = false;
            }
Ejemplo n.º 4
0
            private void Search()
            {
                BlockFilter <IMyTerminalBlock> block_filter = BlockFilter <IMyTerminalBlock> .Create(DisplayLcd.lcd, filter);

                block_filter.HasInventory = true;
                inventories = BlockSystem <IMyTerminalBlock> .SearchByFilter(DisplayLcd.program, block_filter);

                search = false;
            }
Ejemplo n.º 5
0
        private void Search()
        {
            BlockFilter <IMyDoor> block_filter1 = BlockFilter <IMyDoor> .Create(Me, "*");

            doors = BlockSystem <IMyDoor> .SearchByFilter(this, block_filter1);

            BlockFilter <IMySensorBlock> block_filter2 = BlockFilter <IMySensorBlock> .Create(Me, "*");

            sensors = BlockSystem <IMySensorBlock> .SearchByFilter(this, block_filter2);
        }
Ejemplo n.º 6
0
        void RunContinuousLogic()
        {
            if (search)
            {
                Search();
            }
            WriteText($"LCD found: {(lcds != null ? lcds.List.Count : 0)}", false);
            BlockFilter <IMyThrust> block_filter = BlockFilter <IMyThrust> .Create(Me, "C:Up");

            BlockSystem <IMyThrust> thrust = BlockSystem <IMyThrust> .SearchByFilter(this, block_filter);

            if (!thrust.IsEmpty)
            {
                ParserInfo parser = new ParserInfo(this);
                IMyThrust  block  = thrust.First;
                parser.ParserTitle(block);
                parser.ParserTerminalBlock(block);
                parser.ParserThrust(block);
                parser.ParserCubeBlock(block);
            }
        }
Ejemplo n.º 7
0
        private void Prepare()
        {
            BlockFilter <IMyRefinery> filterRefinery = new BlockFilter <IMyRefinery>()
            {
                CubeGrid = Me.CubeGrid
            };

            refinery = BlockSystem <IMyRefinery> .SearchByFilter(this, filterRefinery);

            refinery.ForEach(delegate(IMyRefinery block)
            {
                block.UseConveyorSystem = false;
            });
            BlockFilter <IMyCargoContainer> filterContainer = new BlockFilter <IMyCargoContainer>()
            {
                Filter   = "Ore",
                CubeGrid = Me.CubeGrid
            };

            stock = BlockSystem <IMyCargoContainer> .SearchByFilter(this, filterContainer);
        }
Ejemplo n.º 8
0
            public void Search()
            {
                BlockFilter <IMyDoor> block_filter_doors = BlockFilter <IMyDoor> .Create(program.Me, $"G:{GroupFilter}");

                doors = BlockSystem <IMyDoor> .SearchByFilter(program, block_filter_doors);

                BlockFilter <IMyAirVent> block_filter_airvent = BlockFilter <IMyAirVent> .Create(program.Me, $"G:{GroupFilter}");

                airvent = BlockSystem <IMyAirVent> .SearchByFilter(program, block_filter_airvent);

                BlockFilter <IMyTextPanel> block_filter_control = BlockFilter <IMyTextPanel> .Create(program.Me, $"G:{GroupFilter}");

                control_panel = BlockSystem <IMyTextPanel> .SearchByFilter(program, block_filter_control);

                BlockFilter <IMyLightingBlock> block_filter_light = BlockFilter <IMyLightingBlock> .Create(program.Me, $"G:{GroupFilter}");

                light = BlockSystem <IMyLightingBlock> .SearchByFilter(program, block_filter_light);

                BlockFilter <IMySoundBlock> block_filter_sound = BlockFilter <IMySoundBlock> .Create(program.Me, $"G:{GroupFilter}");

                sound = BlockSystem <IMySoundBlock> .SearchByFilter(program, block_filter_sound);

                if (control_panel != null)
                {
                    control_panel.ForEach(delegate(IMyTextPanel block)
                    {
                        block.ScriptBackgroundColor = Color.Black;
                    });
                }

                if (light != null)
                {
                    light.ForEach(delegate(IMyLightingBlock block)
                    {
                        block.Color = program.MyProperty.GetColor("Airlock", "running_color");
                    });
                    light.Off();
                }
            }
Ejemplo n.º 9
0
            private void Search()
            {
                BlockFilter <IMyTextPanel> block_filter = BlockFilter <IMyTextPanel> .Create(program.Me, lcd_filter);

                lcds = BlockSystem <IMyTextPanel> .SearchByFilter(program, block_filter);
            }
Ejemplo n.º 10
0
            private void Search()
            {
                BlockFilter <IMyThrust> block_thrusters_filter = BlockFilter <IMyThrust> .Create(program.Me, thrusters_filter);

                thrusters = BlockSystem <IMyThrust> .SearchByFilter(program, block_thrusters_filter);
            }