private void LEGACY_UpdateWingAeroModels(bool updateWingInteractions) { List <Part> partsList = EditorLogic.SortedShipList; _wingAerodynamicModel.Clear(); for (int i = 0; i < partsList.Count; i++) { Part p = partsList[i]; if (p != null) { if (p.Modules.Contains <FARWingAerodynamicModel>()) { FARWingAerodynamicModel w = p.Modules.GetModule <FARWingAerodynamicModel>(); if (updateWingInteractions) { w.EditorUpdateWingInteractions(); } _wingAerodynamicModel.Add(w); } else if (p.Modules.Contains <FARControllableSurface>()) { FARControllableSurface c = p.Modules.GetModule <FARControllableSurface>(); if (updateWingInteractions) { c.EditorUpdateWingInteractions(); } _wingAerodynamicModel.Add(c); } } } }
private void LEGACY_UpdateWingAeroModels(bool updateWingInteractions) { List <Part> partsList = EditorLogic.SortedShipList; _wingAerodynamicModel.Clear(); foreach (Part p in partsList) { if (p == null) { continue; } if (p.Modules.Contains <FARWingAerodynamicModel>()) { FARWingAerodynamicModel w = p.Modules.GetModule <FARWingAerodynamicModel>(); if (updateWingInteractions) { w.EditorUpdateWingInteractions(); } _wingAerodynamicModel.Add(w); } else if (p.Modules.Contains <FARControllableSurface>()) { FARControllableSurface c = p.Modules.GetModule <FARControllableSurface>(); if (updateWingInteractions) { c.EditorUpdateWingInteractions(); } _wingAerodynamicModel.Add(c); } } }