-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add per-recipe setting to show/hide the total I/O #340
Conversation
Nice! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there's space for more improvement, to improve discoverability, but this could come later.
When setting (but not deserializing) RecipeRow.entity
, add showTotalIO = value.has_vector_to_place_result && recipe.products.Length > 1
, or maybe |=
instead of =
. (Which requires adding and setting a has_vector_to_place_result
property.)
I don't think that needs a preference for how many products the recipe has before setting showTotalIO
, but then again, I thought that a number-of-products preference was good enough in the previous version of this feature.
You mean automatically setting I do not understand what you mean with |
Oh, I'm sorry. I meant to add a link to https://lua-api.factorio.com/latest/prototypes/CraftingMachinePrototype.html#vector_to_place_result It appears vanilla only sets this property on miners (which only have one output for YAFC) and the recycler. |
It took a bit of refactoring the 'setter' in order to process the With this change the recipe automatically has its |
5a534c1
to
8b23f88
Compare
As discussed in #338 it might be more convenient to make the recipe total I/O configurable per recipe, sicne we cannot figure out a 'catch all' that covers all of the seablock, py and space-age, etc. mods...
The screenshot shows the same recipe twice, one with I/O enabled and one disabled:
Note that the label is renamed to "Show total Input/Output"