The library code for BagOfHolding only concerns itself with the player character’s bulkCapacity … and stepping through the code, I can’t even see where it does that. I would also like it to concern itself with the number of items the PC is holding in her hands (let’s say 5 or 7), not just the PC’s bulkCapacity. If the PC is already holding 7 items including the Bag, then taking more items should ideally shift the oldest inventory items into the Bag (provided the Bag’s affinityFor(obj) allows it).
I have not the faintest idea how to do this. Can anyone suggest a way to approach it? At what point does the library check the bulkCapacity of gPlayerChar? If I knew that, possibly I could modify the library code to do what I need it to do.
I can slap together a short sample game, if anyone can volunteer to test this and offer suggestions.