Max Autocrafting
Zephreo opened this issue ยท 1 comments
Describe the feature
When you autocraft an item during the select amount screen there should be an additional button max which sets the amount to the maximum you can craft given the ingredients in the me system.
Reasons why it should be considered
It will help with automation and crafting of things that are required in arbitrary amounts, I often spend a lot of time checking just how many 64k drives I can actually craft with the number of resources I have.
Example
Calculate the ingredients required for 1
Then divide the amount in the system by the base ingredients
then get the smallest of those numbers, floor it and that's the amount
for(ingredient ing : calc_ingredients) {
list.add(amountInSystem(ing) / ing.requiredAmount)
}
return Math.floor(list.smallest())
I could do it my self if you could point me to the correct java file
Duplicate of #4324