My suggestion is that if the contents of a container can't be put in the player's inventory, put up a dialog box asking if the player wanted to do this. Maybe add a setting to toggle this, if some players don't want to be asked.
Here's some pseudo-code that demonstrates what I mean:
Code: Select all
if (settings.containerDestructMessage == true && relevantContainer.contents.size > player.inventory.getOpenStacks()){
int itemsOnGround = relevantContainer.contents.size - player.inventory.getOpenStacks();
DisplayDialogBox("Do you really want to remove this container. " + itemsOnGround + " items will be left on the ground");
}