You can now change craft quantity before changing the Recipe Components, previously it would reset to 0 but now it sets the crafting quantity to the most you can craft with how much of the component you have.
I've only tested it with 1 component recipes so I'll probably have to add a for loop to check multiple components.
Edit: Actually, changed the maths.
It now checks if;
if Amount Crafting * Component Amount Needed > Amount Have
{
Amount Crafting = Amount Have DIV Component Amount Needed;
}
That should avoid the need for a loop.
1 comment