Open Mernom opened 4 years ago
I recommend removing or commenting out ownlyme's auto-unstacking code if no-one can see a good fix for this - I can't.
It doesn't seem to hard to fix - add an optional last parameter for 'inventory to insert to', for when it's not identical to the 'inventory to remove from', and then check if there are any stacks of the stacked item in the main inventory. If there's not, and there are in the cursor inventory, remove from the cursor inventory, and insert into the bag inventory.
I can try wringing that part.
When the player holds a partial stack of stacked items in the cursor slot and picks up stacked items from the same type (while having no other stacked items of that type in the bag), the auto unstacking script will fail to remove the newly picked up items, while succeeding in inserting the unstacked items.
This allows for item duplication, by using Z on top of yourself while also holding F to pick the dropped item up.