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

Should not prefer inaccessible recipes: Apply cost penalty #257

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

DaleStan
Copy link
Collaborator

@DaleStan DaleStan commented Sep 4, 2024

I have two possible implementations of this fix, but neither is perfect. This one usually behaves as expected, but has code that's simply wrong at CostAnalysis.cs:309. Non-automatable goods are treated as if they cost 0 there, instead of the default Infinity. However, removing that special case creates incorrect "YAFC analysis: There are better recipes to create X. (Wasting 100% of YAFC cost)" messages for recipes with non-automatable goods.

@DaleStan DaleStan requested a review from Dorus September 4, 2024 01:58
@shpaass
Copy link
Owner

shpaass commented Sep 6, 2024

By non-automatable goods, you mean the goods that cannot be crafted by anything else in the project, including disabled recipes?

@DaleStan
Copy link
Collaborator Author

DaleStan commented Sep 9, 2024

No, non-automatable goods means goods that show "YAFC analysis: Unable to find a way to fully automate this" in their tooltip.

In vanilla, anything that depends on Wood is non-automatable, such as a shotgun or a wooden chest. (Or should be; Yafc decides wood is automatable for reasons that I haven't looked into.)

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