Hmm.
> ash available_amount( $item[ hypodermic needle] )
Returned: 0
> ash retrieve_item( 1, $item[ hypodermic needle] )
Stealing hypodermic needle from Sucky Grrl the Mosquito...
Returned: true
We have an internal function - ItemManager.getAccessibleCount() which looks at all the places you might have an item stashed that are easily accessible. I.e., no mall store, no display - and no closet UNLESS you have autoSatisfyWithCloset. It looks in inventory, equipment, your terrarium, freepulls, and in storage if you are out of ronin and in the clan stash if you are out of ronin and have autoSatisfyWithStash set to true.
We also have an internal function - ItemManager.retrieveItem - which will put the desired items into inventory. It will get items from any of the above places, and additionally will create, buy from NPCs, buy from the mall, trade with the hermit or trapper, redeem for coffee pixie sticks or game shop snacks, and so on.
We have two ASH functions which are similar:
available_amount() is like InventoryManager.getAccessibleCount() except it does not look in the terrarium and it always looks in the closet, regardless of autoSatisfyWithCloset.
retrieve_item() calls InventoryManager.retrieveItem().
I believe that available_amount() should call InventoryManager.getAccessibleCount() - which will make it look in the terrarium and obey the autosatisfyWithCloset setting. Those are good, because if you follow it up with retrieve_item(), that function will also do those things.
I will do that.
That is a different issue than the "fold" command. That explicitly looks only at inventory and your equipment. You want the "fold" command to look in the terrarium? That requires a change in the "fold" command, not in the ASH available_amount() function.