Skip to content

Commit

Permalink
Fix #93: don't call ModuleResourceConverter.Recipe because that will …
Browse files Browse the repository at this point in the history
…lock in the current recipe, potentially before B9PS has a chance to change it
  • Loading branch information
JonnyOThan committed May 4, 2023
1 parent 90354b8 commit 6cbb874
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions RasterPropMonitor/Core/RPMVCPerModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,12 @@ internal void UpdateModuleLists()
else if (module is ModuleResourceConverter)
{
ModuleResourceConverter gen = module as ModuleResourceConverter;
ConversionRecipe recipe = gen.Recipe;
for (int i = 0; i < recipe.Outputs.Count; ++i)
foreach (var output in gen.outputList)
{
if (recipe.Outputs[i].ResourceName == "ElectricCharge")
if (output.ResourceName == "ElectricCharge")
{
availableFuelCells.Add(gen);
availableFuelCellOutput.Add((float)recipe.Outputs[i].Ratio);
availableFuelCellOutput.Add((float)output.Ratio);
break;
}
}
Expand Down

0 comments on commit 6cbb874

Please sign in to comment.