예제 #1
0
        public virtual void GetObjectBuilder(MyObjectBuilder_CubeGrid ob)
        {
            ob.DampenersEnabled = ThrustSystem.DampenersEnabled;

            ConveyorSystem.SerializeLines(ob.ConveyorLines);
            if (ob.ConveyorLines.Count == 0)
            {
                ob.ConveyorLines = null;
            }

            if (WheelSystem != null)
            {
                ob.Handbrake = WheelSystem.HandBrake;
            }

            if (MySession.Static.Settings.EnableOxygen)
            {
                ob.OxygenAmount = OxygenSystem.GetOxygenAmount();
            }

            if (MyPerGameSettings.EnableJumpDrive)
            {
                ob.JumpDriveDirection = JumpSystem.GetJumpDriveDirection();
                ob.JumpElapsedTicks   = JumpSystem.GetJumpElapsedTicks();
            }
        }
        public virtual void GetObjectBuilder(MyObjectBuilder_CubeGrid ob)
        {
            var thrustComp = CubeGrid.Components.Get <MyEntityThrustComponent>();

            ob.DampenersEnabled = thrustComp == null || thrustComp.DampenersEnabled;

            ConveyorSystem.SerializeLines(ob.ConveyorLines);
            if (ob.ConveyorLines.Count == 0)
            {
                ob.ConveyorLines = null;
            }

            if (WheelSystem != null)
            {
                ob.Handbrake = WheelSystem.HandBrake;
            }

            if (MySession.Static.Settings.EnableOxygen && MySession.Static.Settings.EnableOxygenPressurization)
            {
                ob.OxygenAmount = GasSystem.GetOxygenAmount();
            }

            if (MyPerGameSettings.EnableJumpDrive)
            {
                ob.JumpDriveDirection = JumpSystem.GetJumpDriveDirection();
                ob.JumpRemainingTime  = JumpSystem.GetRemainingJumpTime();
            }
        }
예제 #3
0
        public virtual void GetObjectBuilder(MyObjectBuilder_CubeGrid ob)
        {
            ob.DampenersEnabled = ThrustSystem.DampenersEnabled;

            ConveyorSystem.SerializeLines(ob.ConveyorLines);
            if (ob.ConveyorLines.Count == 0)
            {
                ob.ConveyorLines = null;
            }

            if (WheelSystem != null)
            {
                ob.Handbrake = WheelSystem.HandBrake;
            }

            if (MySession.Static.Settings.EnableOxygen)
            {
                ob.OxygenAmount = OxygenSystem.GetOxygenAmount();
            }
        }