public static bool Prefix(ref ResourceEntry __instance)
            {
                var cont = true;

                // check active modifiers
                var check = (Modifier)Traverse.Create(Global.Instance.GetInputManager().GetDefaultController()).Field("mActiveModifiers").GetValue();

                if (check == Modifier.Shift)
                {
                    cont = false;                     // don't execute original OnClick

                    Tag tag = (Tag)__instance.Resource;

                    if (favoritesCategoryHeader != null)
                    {
                        ResourceEntry resourceEntry = null;

                        HashSet <Tag> hashSet = null;
                        hashSet = WorldInventory.Instance.GetDiscoveredResourcesFromTag(favoritesCategoryHeader.ResourceCategoryTag);

                        if (hashSet.Contains(tag))
                        {
                            //Debug.Log("Toggle: Off");
                            // NOTE: removes resource tracking in Favorites category but still displays the button
                            hashSet.Remove(tag);

                            favoritesCategoryHeader.ResourcesDiscovered.TryGetValue(tag, out resourceEntry);

                            if (resourceEntry != null)
                            {
                                favoritesCategoryHeader.ResourcesDiscovered.Remove(tag);
                                resourceEntry.DeleteObject();
                                //resourceEntry.gameObject.SetActive(false);
                            }
                        }
                        else
                        {
                            //Debug.Log("Toggle: On");
                            // Activate the ResourceEntry
                            var discoverCat = Traverse.Create(WorldInventory.Instance).Method("DiscoverCategory", new[] { typeof(Tag), typeof(Tag) });
                            discoverCat.GetValue(favoritesCategoryHeader.ResourceCategoryTag, tag);

                            if (!favoritesCategoryHeader.ResourcesDiscovered.TryGetValue(tag, out resourceEntry))
                            {
                                List <Tag>    ts   = WorldInventory.Instance.GetPickupableTagsFromCategoryTag(tag);
                                HashSet <Tag> tags = new HashSet <Tag>(ts);
                                Tag           cat  = WorldInventory.GetCategoryForTags(tags);
                                //Debug.Log("[Favorites] <ResourceEntry_OnClick> cat: " + cat);

                                GameUtil.MeasureUnit measure = GameUtil.MeasureUnit.mass;
                                if (GameTags.CalorieCategories.Contains(cat))
                                {
                                    measure = GameUtil.MeasureUnit.kcal;
                                }
                                if (GameTags.UnitCategories.Contains(cat))
                                {
                                    measure = GameUtil.MeasureUnit.quantity;
                                }

                                //Debug.Log("[Favorites] <ResourceEntry_OnClick> measure: " + measure);
                                var newResourceEntry = Traverse.Create(favoritesCategoryHeader).Method("NewResourceEntry", new[] { typeof(Tag), typeof(GameUtil.MeasureUnit) });
                                resourceEntry = newResourceEntry.GetValue <ResourceEntry>(tag, measure);
                                favoritesCategoryHeader.ResourcesDiscovered.Add(tag, resourceEntry);
                            }

                            if (resourceEntry != null)                               // NOTE: might no longer need this
                            {
                                resourceEntry.gameObject.SetActive(true);
                            }
                        }
                    }
                }
                return(cont);                // if true: execute original OnClick
            }