TheDarklingWolf/Cataclysm-DDA — pull request #875 by origamiwolf (2013-05-06 15:14:43+00:00)
Title: Liquid unloading bugfix attempt #2.  Hopefully fixes #808 

What was happening was that the container to be unloaded stayed in the stack during the unloading process, and then became the container to be unloaded into. The content addition and subtraction logic then removes everything from this container.

The unload code was thus changed to remove the container to be unloaded from the inventory first, and then add it back to the inventory after unloading.

This unfortunately has the side effect of showing an empty inventory when attempting to unload a stack of 1 item, without any valid containers to unload into. Escaping from this inventory screen continues the code sequence normally, ie, emptying the contents onto the floor.