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(#272, 696fd52): Boilers respect the selected input temperature again. #273

Merged

Conversation

DaleStan
Copy link
Collaborator

@DaleStan DaleStan commented Sep 8, 2024

When used as inputs to be boiled, fluids with multiple temperatures were treated as if they were already at their maximum temperature.

In addition to the new test, I also confirmed that the boiler mechanics for pY showed the same number of buildings for each input temperature here as they did in 0.8.1.

…ture again.

When used as inputs to be boiled, fluids with multiple temperatures were treated as if they were already at their maximum temperature.
@shpaass shpaass force-pushed the 272-py-incorrect-numbers-for-oil-burner branch from 4d7052a to 3f5b4e6 Compare September 8, 2024 06:38
@shpaass
Copy link
Owner

shpaass commented Sep 8, 2024

Rebased on fresh master

Copy link
Owner

@shpaass shpaass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for the tests!

@shpaass shpaass merged commit 5b37b4f into shpaass:master Sep 8, 2024
1 check passed
@@ -120,7 +121,7 @@ public static RecipeParameters CalculateParameters(RecipeRow row) {
var fluid = recipe.ingredients[0].goods.fluid;
if (fluid != null) {
float inputTemperature = fluid.temperature;
foreach (Fluid variant in fluid.variants ?? []) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for better understanding what the problem was and how that line solves it, could you please explain it to us?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

row.variants contains the variants selected for the recipe row (usually fluid ingredient temperatures, but sometimes an accumulator), while fluid.variants contains all possible temperatures for that fluid. This change restores the behavior of searching the temperatures selected for this row, instead of the possible temperatures for the input fluid.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the explanation!

@shpaass
Copy link
Owner

shpaass commented Sep 8, 2024

I don't remember if it's the intended behavior, so I wanted to note it here:
Yafc says "Wasting X% of Yafc cost" when the technologies that don't waste cost are either behind a not-unlocked milestones or are disabled. That is true for boilers in pY too, as the only thing that doesn't waste cost to make Steam 250 is Simik Boiler.

@DaleStan DaleStan deleted the 272-py-incorrect-numbers-for-oil-burner branch September 8, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants