Пример #1
0
 internal Hangar(MyGridProgram p, string id)
 {
     caller   = p;
     shipGrid = caller.Me.CubeGrid;
     hangarID = id;
     build();
 }
Пример #2
0
 internal Airlock(MyGridProgram p, string id)
 {
     caller    = p;
     shipGrid  = caller.Me.CubeGrid;
     airlockID = id;
     build();
 }
Пример #3
0
            internal SectionBlocks(VRage.Game.ModAPI.Ingame.IMyCubeGrid grid, string name, List <IMyTerminalBlock> blocks)
            {
                this.grid   = grid;
                sectionName = name;

                int blockCount = 0;

                foreach (IMyTerminalBlock block in blocks)
                {
                    bool flag = false;
                    if (block is IMyAirVent)
                    {
                        vents.Add(block as IMyAirVent);
                        flag = true;
                    }
                    else if (block is IMyLightingBlock)
                    {
                        o2Lights.Add(block as IMyLightingBlock);
                        flag = true;
                    }
                    else if (block is IMySoundBlock)
                    {
                        alarms.Add(block as IMySoundBlock);
                        flag = true;
                    }
                    if (flag)
                    {
                        centerPosition += block.GetPosition();
                        blockCount++;
                    }
                }
                if (blockCount > 0)
                {
                    centerPosition.X /= blockCount;
                    centerPosition.Y /= blockCount;
                    centerPosition.Z /= blockCount;
                }

                if (vents.Count == 0)
                {
                    throw new Exception("Section " + sectionName + " has no corresponding air vents!");
                }
            }
Пример #4
0
 internal ShipLayout(MyGridProgram p)
 {
     caller   = p;
     shipGrid = caller.Me.CubeGrid;
 }
Пример #5
0
 private static bool TAPI_GridShieldOnline(VRage.Game.ModAPI.Ingame.IMyCubeGrid arg) => TAPI_GridShieldOnline(arg as IMyCubeGrid);
Пример #6
0
 private static bool TAPI_GridHasShield(VRage.Game.ModAPI.Ingame.IMyCubeGrid arg) => TAPI_GridHasShield(arg as IMyCubeGrid);