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

Show total output for scrap #338

Merged
merged 4 commits into from
Oct 31, 2024

Conversation

DaleStan
Copy link
Collaborator

When drawing a recipe with several item inputs or outputs, the UI will add synthetic [I] or [O] items, representing the total sushi input or output:
image

The default count is three, but it can be changed in the preferences:
image

These synthetic items can't be linked, but you can set a fixed count for them if you want a particular number of sushi-belts of production or consumption.

@DaleStan DaleStan requested a review from shpaass as a code owner October 30, 2024 21:54
@DaleStan DaleStan linked an issue Oct 30, 2024 that may be closed by this pull request
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 for the feature! That was fast.
I'll keep the PR open for a bit, for others to check it too.

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.

nice solution, using the 'features' we already have
Code looks fine as well to me

@shpaass shpaass force-pushed the 337-show-total-output-for-scrap branch from 579fe8e to 6bc35a4 Compare October 31, 2024 09:10
@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

Rebased on fresh master

@shpaass shpaass merged commit b57cbfa into shpaass:master Oct 31, 2024
1 check passed
@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

Found a problem: In Pyanodons and other mods that have tons of many-out recipes, one would be incentivized to disable this feature because otherwise these stats would show on most of the recipes. We don't want it for most recipes because one never does sushi on anything unless it's forced.

The current solution is to disable the feature by increasing the number.
I would suggest to at least make the default value 11, so it only shows for the Scrap recipe and everything that outputs more, which is not many recipes.

@veger
Copy link
Collaborator

veger commented Oct 31, 2024

Or make this value configurable per project and/or an option to enable/disable completely?

@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

and/or an option to enable/disable completely?

No need for such an option when it can be achieved by increasing the number to unreachable heights.

make this value configurable per project

I see no need to go that deep because the per-project functionality is unlikely to be used.

@veger
Copy link
Collaborator

veger commented Oct 31, 2024

The OP mentioned:

Similarly, in SeaBlock, I want to saturate a belt with geodes, from the recipe that produces many colours at once.

I guess a value of '11' will block this one? (IIRC there are 6 geode colors?)
Another mod will have something else...

That is why I was wondering to make this configurable

@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

Hmmm, good example. But making it per-project requires to add more persistence, which is more work.
I thought a user can be bothered to change the setting when they switch modpacks.

@veger
Copy link
Collaborator

veger commented Oct 31, 2024

I thought a user can be bothered to change the setting when they switch modpacks.

You mean making it a global setting? Could also work (but is the same amount of work?)

@veger
Copy link
Collaborator

veger commented Oct 31, 2024

So back to the topic/suggestion: making the default 11

If we want to let seablock/geodes work by default, then we should increase the default to 5 (or what is the number of geode colors?). Does that reduce adding I/O signals for the py mod suite, or is it still to low?

@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

Simple Circut board and Battery have recipes with 7 inputs. Mechanical Parts 1 is 8 inputs.
Advanced Small Parts is 11 and Complex Circuit Board is 12, so they are affected even then. Hmmm.

@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

The situation is that for pY, there are popular recipes with the number of inputs exceeding 11.
For them, this input-sum will be useless, taking the screen space and attention for nothing.

We might need a per-recipe setting for this functionality, but I don't yet know where to put it on the UI.

@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

Hmmm, the LMB menu for the recipe icon does not have many buttons. We can put it here.

image

@veger
Copy link
Collaborator

veger commented Oct 31, 2024

For a per-recipe setting, we can use the 'context menu' (where you can set the fixed building, delete, etc)?
No idea if this is desired though, but with such a wide spread it might be hard to configure a suitable default

Edit We had the same thought 😄

@veger
Copy link
Collaborator

veger commented Oct 31, 2024

You want to replace the whole minForTotalItems with the LMB menu setting? Or have both (somehow)?

@veger
Copy link
Collaborator

veger commented Oct 31, 2024

I quickly tried, and it feels quite natural. I'll clean up a little and open a follow up PR.

@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

You want to replace the whole minForTotalItems with the LMB menu setting?

Yes, I'd want to replace the project-wide setting with the per-recipe setting.

@CricketBr
Copy link

Thank you! I knew it would be useful, but didn't realize it would also be easy.

Making the threshold adjustable is a good idea. That will work very well for Fulgora and SeaBlock. I don't know about the other planets. By project is better, so you don't lose it when you change modpacks, but it's not too hard to change.

How distracting is the extra information?

Is it worth separating the input and output threshold? Most multi-input recipes have a separate lane for each input so don't need the input total.

We don't want it for most recipes because one never does sushi on anything unless it's forced.
If a machine outputs multiple items, we need to know the total to choose an output belt, before it reaches the sorting area.

Either method would work for the modpacks I've used. Only a few recipes need the extra information (so it's easy to set for each one), and no other recipes have that many outputs (so a threshold is easy to set).

@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

didn't realize it would also be easy

It was not easy. It was only due to @veger @DaleStan expertise that he was able to implement it that fast. It would take an order of magnitude more time for nearly anyone else because they'd have to understand the existing code first.

How distracting is the extra information?

Sufficiently distracting. Figuratively, imagine that all recipes now have an output or input item that does nothing but take space on the screen.

Is it worth separating the input and output threshold?

Not worth it. From what I remember, there are no recipes that both take that many inputs and outputs at the same time. For instance, if the setting is enabled, it only shows the input summary when the input is over the threshold. Same for the output.

@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

If a machine outputs multiple items, we need to know the total to choose an output belt

I encourage you to ask any overhaul-mod player if they did sushi when they were not forced to. You will find out that sushi is almost never used aside from being mandatory or being the voiding/conversion for all the inputs.

The only example of non-forced sushi that I remember in pY is the biomass conversion. The input-sum functionality is not useful in this case.

@veger
Copy link
Collaborator

veger commented Oct 31, 2024

It was not easy. It was only due to @veger expertise that he was able to implement it that fast

No me, @DaleStan you mean 😉

@shpaass
Copy link
Owner

shpaass commented Oct 31, 2024

No me, @DaleStan you mean 😉

Apologies, you're right.

@CricketBr
Copy link

didn't realize it would also be easy

It was not easy. It was only due to @veger @DaleStan expertise that he was able to implement it that fast. It would take an order of magnitude more time for nearly anyone else because they'd have to understand the existing code first.

Quick, then? Either way, many thanks!

How distracting is the extra information?

Sufficiently distracting. Figuratively, imagine that all recipes now have an output or input item that does nothing but take space on the screen.

Good point. Width is already a problem for me when I try to put the game and YAFC on side-by-side.

Is it worth separating the input and output threshold?

Not worth it. From what I remember, there are no recipes that both take that many inputs and outputs at the same time. For instance, if the setting is enabled, it only shows the input summary when the input is over the threshold. Same for the output.

@CricketBr
Copy link

I encourage you to ask any overhaul-mod player if they did sushi when they were not forced to. You will find out that sushi is almost never used aside from being mandatory or being the voiding/conversion for all the inputs.

I did sushi for geodes for my 100x SeaBlock run. It worked very well.

@DaleStan DaleStan deleted the 337-show-total-output-for-scrap branch October 31, 2024 17:28
shpaass added a commit that referenced this pull request Oct 31, 2024
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:

![image](https://github.com/user-attachments/assets/4f62fd0c-e65a-4f8a-be28-6c94331d6e91)
*Note that the label is renamed to "Show total Input/Output"*
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.

Show total output for scrap
4 participants