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 handling of disabled recipes #130

Merged
merged 4 commits into from
May 15, 2024
Merged

Fix handling of disabled recipes #130

merged 4 commits into from
May 15, 2024

Conversation

DaleStan
Copy link
Collaborator

As discussed briefly in #122, always show empty boxes for both the ingredients and products of disabled recipes. That is, they'll always look like this:
image

I also discovered the code that cleans up old links removes links if the item/fluid does not appear in any enabled recipes. I wanted the links to stay put when disabling and enabling recipes, and I couldn't concentrate on #122 with that behavior, so I changed the code to consider all recipes. If that change (f28d35f) should be discussed more, I can remove it from this PR.

@Dorus
Copy link
Collaborator

Dorus commented May 14, 2024

I also discovered the code that cleans up old links removes links if the item/fluid does not appear in any enabled recipes.

How so? It's not doing that for me in the master branch.

@DaleStan
Copy link
Collaborator Author

@Dorus It's more of a special case than I realized, but load this file, and disable and enable the small parts recipe. The links for bolts, copper cable, and iron gear wheel will get deleted.
links.yafc.txt

@shpaass
Copy link
Owner

shpaass commented May 15, 2024

Will test it today after 11 hours.

@veger veger changed the title Fix #122 Fix handling of disabled recipes May 15, 2024
Copy link
Collaborator

@veger veger left a comment

Choose a reason for hiding this comment

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

Code changes look good to me.

I tried running it and while there are not visible issues, I do not see any difference with master branch when disabling/enabling. I guess I do not fully understand what I should try... 😞 But having the item icons hidden and the building/fuel icons visible looks good to me good.

@shpaass shpaass merged commit c687398 into shpaass:master May 15, 2024
1 check passed
@DaleStan DaleStan deleted the fix-122 branch May 16, 2024 00:35
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.

(Investigation) Why do recipes sometimes show up for disabled recipes and sometimes do not?
4 participants