Added usedful feature for keeping the inventory open if the action does not involve inventories