Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#419): Products after a fluid did not link correctly. #420

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Yafc.Model/Model/ProductionTableContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,6 @@ IEnumerable<RecipeRowIngredient> @internal() {

private IEnumerable<RecipeRowProduct> BuildProducts(bool forSolver) {
float factor = forSolver ? 1 : (float)recipesPerSecond; // recipesPerSecond can be 0 when running the solver, which would create useless results.
int i = 0;
IObjectWithQuality<Item>? spentFuel = fuel.FuelResult();
bool handledFuel = spentFuel == null || forSolver; // If we're running the solver or there's no spent fuel, it's already handled.

Expand All @@ -481,7 +480,9 @@ private IEnumerable<RecipeRowProduct> BuildProducts(bool forSolver) {
}
}

foreach (Product product in recipe.target.products) {
for (int i = 0; i < recipe.target.products.Length; i++) {
Product product = recipe.target.products[i];

if (hierarchyEnabled) {
Quality quality = recipe.quality;
float baseAmount = product.GetAmountPerRecipe(parameters.productivity);
Expand All @@ -504,8 +505,6 @@ private IEnumerable<RecipeRowProduct> BuildProducts(bool forSolver) {
}
quality = quality.nextQuality!;
}

i++;
}
}
else {
Expand Down
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
// Internal changes:
// Changes to the code that do not affect the behavior of the program.
----------------------------------------------------------------------------------------------------------------------
Version:
Date:
Fixes:
- (regression) Links for recipes with fluid outputs were not handled correctly.
----------------------------------------------------------------------------------------------------------------------
Version: 2.8.0
Date: February 19th 2025
Features:
Expand Down