private void ApplyConverterChanges(ModuleResourceConverter_USI converter, ModuleSwapOption loadout) { converter.ConverterName = loadout.ConverterName; converter.StartActionName = loadout.StartActionName; converter.StopActionName = loadout.StopActionName; converter.UseSpecialistBonus = loadout.UseSpecialistBonus; if (converter.UseSpecialistBonus) { converter.ExperienceEffect = loadout.ExperienceEffect; } converter.inputList.Clear(); converter.outputList.Clear(); converter.reqList.Clear(); converter.Recipe.Inputs.Clear(); converter.Recipe.Outputs.Clear(); converter.Recipe.Requirements.Clear(); converter.inputList.AddRange(loadout.inputList); converter.outputList.AddRange(loadout.outputList); converter.reqList.AddRange(loadout.reqList); converter.Recipe.Inputs.AddRange(loadout.inputList); converter.Recipe.Outputs.AddRange(loadout.outputList); converter.Recipe.Requirements.AddRange(loadout.reqList); }
private void ApplyHarvesterChanges(ModuleResourceHarvester_USI harvester, ModuleSwapOption loadout) { harvester.Efficiency = loadout.Efficiency; harvester.ResourceName = loadout.ResourceName; harvester.ConverterName = loadout.ConverterName; harvester.StartActionName = loadout.StartActionName; harvester.StopActionName = loadout.StopActionName; MonoUtilities.RefreshContextWindows(part); }