Theraze
Active member
Sure... I asked for vprint (debugging) levels for several months and never really got a response, which is why we have the "way too much info" level 8, and the "this is normal stuff" level 3. If you can tell me roughly what you expect to see at which levels... I'd expect that either 6 or 7 would be the last 'debugging something' level, and 5 or 6 would be the 'I'm a normal user who likes information' level. The current 8 could be moved up to 9 if needed. I don't expect the current 3 to change.
Note also that what you CAN do is set verbosity to 8 and then run one of those lines per above to JUST see that happening... if you run that availability line at 8, you should see it work through availability... it appears, from a quick check, like we just look in availability if we can make another, not check how many total we can create, since that doesn't REALLY matter. Based on this:
Basically, while we have the ingredients and the amount we're making plus the amount we already have is less than 1, add one to the make count. Want to check if you have enough ingredients for 3 chunky marys? You'd want to check them like so:
Note also that what you CAN do is set verbosity to 8 and then run one of those lines per above to JUST see that happening... if you run that availability line at 8, you should see it work through availability... it appears, from a quick check, like we just look in availability if we can make another, not check how many total we can create, since that doesn't REALLY matter. Based on this:
Code:
while (have_ingredients(con.it, (createamt + 1), ings, 0) && createamt + con.have < 1)
createamt += 1;
Do I have enough for 3 marys? Nope. Enough for 1 sauerlager? Yep. Have ingredients works with the item desired, how many, ingredients already used, and if we're looping already (if we're calling have_ingredients from inside itself)... the loop check is what's needed to keep items like wads of dough from looping infinitely.> ash import <eatdrink.ash> int[item] ings; have_ingredients($item[chunky mary], 3, ings, 0);
Returned: false
> ash import <eatdrink.ash> int[item] ings; have_ingredients($item[die sauer], 1, ings, 0);
Returned: true