SSTUTools.SSTUModularBooster.updateCurvePersistentData C# (CSharp) Method

updateCurvePersistentData() private method

Update the persistent representation of the custom thrust curve for this engine and store it as a string so it will be serialized into the part/craft persistence file
private updateCurvePersistentData ( ) : void
return void
        private void updateCurvePersistentData()
        {
            if (thrustCurveCache != null && string.IsNullOrEmpty(presetCurveName))
            {
                string data = "";
                int len = thrustCurveCache.Curve.length;
                Keyframe key;
                for (int i = 0; i < len; i++)
                {
                    key = thrustCurveCache.Curve.keys[i];
                    if (i > 0) { data = data + ":"; }
                    data = data + key.time + "," + key.value + "," + key.inTangent + "," + key.outTangent;
                }
                thrustCurveData = data;
            }
        }