private void StashGlobally()
        {
            // try to stash to fridge first
            if (Config.StashAnywhereToFridge && ChestExtension.GetFridge(Game1.player) is Chest fridge)
            {
                StackLogic.StashToChest(fridge, CategorizedAcceptingFunction);
                StackLogic.StashToChest(fridge, ExistingStacksAcceptingFunction);
            }

            // try to find all chests by location
            if (Game1.player.currentLocation == null)
            {
                return;
            }

            var chests = Utility.GetLocations().SelectMany(location => location.Objects.Pairs).Select(pair => pair.Value).OfType <Chest>().ToList();

            // stash by category
            foreach (var chest in chests)
            {
                StackLogic.StashToChest(chest, CategorizedAcceptingFunction);
            }

            // stash by existing
            foreach (var chest in chests)
            {
                StackLogic.StashToChest(chest, ExistingStacksAcceptingFunction);
            }
        }
        private void TryStashNearby()
        {
            if (Game1.player.currentLocation == null)
            {
                return;
            }

            if (Game1.activeClickableMenu is ItemGrabMenu m && m.context is Chest c)
            {
                StackLogic.StashToChest(c, AcceptingFunction);
            }