Example #1
0
        public override void Execute(SharedObjects shared)
        {
            string         bodyName = shared.Cpu.PopValue().ToString();
            BodyAtmosphere result   = new BodyAtmosphere(VesselUtils.GetBodyByName(bodyName));

            shared.Cpu.PushStack(result);
        }
Example #2
0
        public override void Execute(SharedObjects shared)
        {
            string bodyName = PopValueAssert(shared).ToString();

            AssertArgBottomAndConsume(shared);
            var result = new BodyAtmosphere(VesselUtils.GetBodyByName(bodyName));

            ReturnValue = result;
        }
Example #3
0
        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;
        }