Admin ADMIN
2026.08.11
Reproduced, and you found a real one. When you drag a stack out of the bag, the code that actually takes the items away only ever knew *what* item you dropped, never *which slot* it came from. InventorySystem.removeItem() walks the bag from the top and subtracts from the first slot holding that item, so if you have (say) 200 arrows in slot 3 and 40 arrows in slot 11 and you drag the 40, it takes 40 off the slot-3 stack and leaves slot 11 untouched. It looks exactly like "it dropped the top one instead".
The fix is to carry the slot position through the drop: the inventory window already knows the exact slot you grabbed (it uses it for drag-to-rearrange), it just wasn't passing it on. A new InventorySystem.removeFromSlot(itemKey, pos, count) takes the units out of that one slot and nothing else, and the drop handler calls it instead of removeItem. The how-many-to-drop dialog remembers the same slot, so a partial drop also comes off the stack you picked.
Thanks for the clear report — this is the kind of thing that quietly eats items.
The fix is to carry the slot position through the drop: the inventory window already knows the exact slot you grabbed (it uses it for drag-to-rearrange), it just wasn't passing it on. A new InventorySystem.removeFromSlot(itemKey, pos, count) takes the units out of that one slot and nothing else, and the drop handler calls it instead of removeItem. The how-many-to-drop dialog remembers the same slot, so a partial drop also comes off the stack you picked.
Thanks for the clear report — this is the kind of thing that quietly eats items.








