public bool IsFavoriteRecipe(string name, bool cooking, Farmer?who = null)
    {
        AssertLoaded();
        who ??= Game1.player;

        lock (UserFavorites) {
            CaseInsensitiveHashSet favorites = GetFavoriteRecipes(who, cooking);
            return(favorites.Contains(name));
        }
    }
    public void ToggleFavoriteRecipe(string name, bool cooking, Farmer?who = null)
    {
        AssertLoaded();
        who ??= Game1.player;

        lock (UserFavorites) {
            CaseInsensitiveHashSet favorites = GetFavoriteRecipes(who, cooking);
            if (favorites.Contains(name))
            {
                favorites.Remove(name);
            }
            else
            {
                favorites.Add(name);
            }

            Modified = true;
        }
    }