SSTUTools.SSTUModularBooster.updateNoseFromEditor C# (CSharp) Method

updateNoseFromEditor() private method

Update the nose module from user input in the editor
private updateNoseFromEditor ( String newNose, bool updateSymmetry ) : void
newNose String
updateSymmetry bool
return void
        private void updateNoseFromEditor(String newNose, bool updateSymmetry)
        {
            SingleModelData mod = Array.Find(noseModules, m => m.name == newNose);
            if (mod != null && mod != currentNoseModule)
            {
                currentNoseModule.destroyCurrentModel();
                mod.setupModel(part.transform.FindRecursive(baseTransformName), ModelOrientation.TOP);
                currentNoseModule = mod;
            }
            currentNoseName = currentNoseModule.name;
            if (!currentNoseModule.isValidTextureSet(currentNoseTexture))
            {
                currentNoseTexture = currentNoseModule.getDefaultTextureSet();
            }
            currentNoseModule.enableTextureSet(currentNoseTexture);
            currentNoseModule.updateTextureUIControl(this, "currentNoseTexture", currentNoseTexture);
            updateModelScaleAndPosition();
            updateEffectsScale();
            updateContainerVolume();
            updatePartMass();
            updatePartCost();
            updateAttachnodes(true);
            updateEditorValues();
            updateGui();
            if (updateSymmetry)
            {
                foreach (Part p in part.symmetryCounterparts)
                {
                    p.GetComponent<SSTUModularBooster>().updateNoseFromEditor(newNose, false);
                }
            }
            SSTUStockInterop.fireEditorUpdate();
            SSTUModInterop.onPartGeometryUpdate(part, true);
        }