SSTU - Shadow Space Technologies Unlimited

SSTU - Shadow Space Technologies Unlimited

98.5k Downloads

SRB thrust curves don't update symmetry

blowfishpro opened this issue ยท 1 comments

commented

I think this is a trivial fix. Let me know and I'll make it.

commented

Fixed in dev (hopefully):

        public void closeGui(FloatCurve editorCurve, string preset)
        {         
            guiOpen = false;
            EditorLogic editor = EditorLogic.fetch;
            if (editor != null) { editor.Unlock("SSTUThrustCurveEditorLock"); }            
            thrustCurveCache = editorCurve;
            presetCurveName = preset;
            updateThrustOutput();
            updateCurvePersistentData();

            this.forEachSymmetryCounterpart(m =>
            {
                ConfigNode n = new ConfigNode();
                thrustCurveCache.Save(n);
                m.presetCurveName = preset;
                if (m.thrustCurveCache == null)
                {
                    m.thrustCurveCache = new FloatCurve();
                }
                m.thrustCurveCache.Load(n);
                m.updateThrustOutput();
                m.updateCurvePersistentData();
            });
        }