internal Hangar(MyGridProgram p, string id) { caller = p; shipGrid = caller.Me.CubeGrid; hangarID = id; build(); }
internal Airlock(MyGridProgram p, string id) { caller = p; shipGrid = caller.Me.CubeGrid; airlockID = id; build(); }
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!"); } }
internal ShipLayout(MyGridProgram p) { caller = p; shipGrid = caller.Me.CubeGrid; }
private static bool TAPI_GridShieldOnline(VRage.Game.ModAPI.Ingame.IMyCubeGrid arg) => TAPI_GridShieldOnline(arg as IMyCubeGrid);
private static bool TAPI_GridHasShield(VRage.Game.ModAPI.Ingame.IMyCubeGrid arg) => TAPI_GridHasShield(arg as IMyCubeGrid);