private void SetupLoadouts() { //Get our Module List Loadouts = new List <LoadoutInfo>(); int id = 0; var loadoutNames = new List <string>(); var mods = part.FindModulesImplementing <BaseConverter>(); var count = mods.Count; for (int i = 0; i < count; ++i) { var con = mods[i]; var loadout = new LoadoutInfo(); loadout.LoadoutName = con.ConverterName; loadout.ModuleId = id; loadoutNames.Add(con.ConverterName); Loadouts.Add(loadout); if (!con.IsActivated) { con.DisableModule(); } id++; } MonoUtilities.RefreshContextWindows(part); }
private void SetupLoadouts() { //Get our Module List Loadouts = new List<LoadoutInfo>(); int id = 0; var loadoutNames = new List<string>(); var mods = part.FindModulesImplementing<BaseConverter>(); var count = mods.Count; for (int i = 0; i < count; ++i) { var con = mods[i]; var loadout = new LoadoutInfo(); loadout.LoadoutName = con.ConverterName; loadout.ModuleId = id; loadoutNames.Add(con.ConverterName); Loadouts.Add(loadout); if(!con.IsActivated) con.DisableModule(); id++; } MonoUtilities.RefreshContextWindows(part); }
private void SetupLoadouts() { //Get our Module List Loadouts = new List<LoadoutInfo>(); int id = 0; var loadoutNames = new List<string>(); var mods = part.FindModulesImplementing<BaseConverter>(); foreach (var con in mods) { var loadout = new LoadoutInfo(); loadout.BaseEfficiency = con.Efficiency; loadout.LoadoutName = con.ConverterName; loadout.ModuleId = id; loadoutNames.Add(con.ConverterName); Loadouts.Add(loadout); if(!con.IsActivated) con.DisableModule(); id++; } MonoUtilities.RefreshContextWindows(part); }