private void buildFairing() { fairingBase.clearProfile(); UVMap uvs = UVMap.GetUVMapGlobal(uvMap); fairingBase.outsideUV = uvs.getArea("outside"); fairingBase.insideUV = uvs.getArea("inside"); fairingBase.edgesUV = uvs.getArea("edges"); float halfHeight = currentHeight * 0.5f; fairingBase.addRing(-halfHeight, currentBottomDiameter * 0.5f); if (currentTopDiameter != currentBottomDiameter) { fairingBase.addRing(-halfHeight + currentTaperHeight, currentBottomDiameter * 0.5f); } if (currentHeight != currentTaperHeight || currentTopDiameter == currentBottomDiameter) { fairingBase.addRing(halfHeight, currentTopDiameter * 0.5f); } fairingBase.generateColliders = this.generateColliders; fairingBase.generateFairing(); fairingBase.setMaterial(fairingMaterial); fairingBase.setOpacity(HighLogic.LoadedSceneIsEditor && editorTransparency ? 0.25f : 1.0f); updateEnginePositionAndScale(); SSTUModInterop.onPartGeometryUpdate(part, true); SSTUStockInterop.fireEditorUpdate(); }
public void invertEnginesEvent() { invertEngines = !invertEngines; updateEnginePositionAndScale(); this.forEachSymmetryCounterpart(module => { module.invertEngines = this.invertEngines; module.updateEnginePositionAndScale(); }); SSTUStockInterop.fireEditorUpdate(); }
private void invertEnginesFromEditor(bool updateSymmetry) { invertEngines = !invertEngines; updateEnginePositionAndScale(); if (updateSymmetry) { SSTUInterstageDecoupler idc; foreach (Part p in part.symmetryCounterparts) { idc = part.GetComponent <SSTUInterstageDecoupler>(); idc.invertEngines = invertEngines; idc.updateEnginePositionAndScale(); } SSTUStockInterop.fireEditorUpdate(); } }