public override void Execute(SharedObjects shared) { string bodyName = shared.Cpu.PopValue().ToString(); BodyAtmosphere result = new BodyAtmosphere(VesselUtils.GetBodyByName(bodyName)); shared.Cpu.PushStack(result); }
public override void Execute(SharedObjects shared) { string bodyName = PopValueAssert(shared).ToString(); AssertArgBottomAndConsume(shared); var result = new BodyAtmosphere(VesselUtils.GetBodyByName(bodyName)); ReturnValue = result; }
public override void Execute(SharedObjects shared) { string bodyName = PopValueAssert(shared).ToString(); AssertArgBottomAndConsume(shared); var bod = VesselUtils.GetBodyByName(bodyName); if (bod == null) { throw new KOSInvalidArgumentException(GetFuncName(), bodyName, "Body not found in this solar system"); } var result = new BodyAtmosphere(bod, shared); ReturnValue = result; }