public static bool IsObjectUprooted(GameObject plant)
    {
        BudUprootedMonitor component = plant.GetComponent <BudUprootedMonitor>();

        if ((Object)component == (Object)null)
        {
            return(false);
        }
        return(component.IsUprooted);
    }
    private string GetSelectedObjectCodexID()
    {
        string text = string.Empty;
        CellSelectionObject       component  = SelectTool.Instance.selected.GetComponent <CellSelectionObject>();
        BuildingUnderConstruction component2 = SelectTool.Instance.selected.GetComponent <BuildingUnderConstruction>();
        CreatureBrain             component3 = SelectTool.Instance.selected.GetComponent <CreatureBrain>();
        PlantableSeed             component4 = SelectTool.Instance.selected.GetComponent <PlantableSeed>();
        BudUprootedMonitor        component5 = SelectTool.Instance.selected.GetComponent <BudUprootedMonitor>();

        if ((UnityEngine.Object)component != (UnityEngine.Object)null)
        {
            text = CodexCache.FormatLinkID(component.element.id.ToString());
        }
        else if ((UnityEngine.Object)component2 != (UnityEngine.Object)null)
        {
            text = CodexCache.FormatLinkID(component2.Def.PrefabID);
        }
        else if ((UnityEngine.Object)component3 != (UnityEngine.Object)null)
        {
            text = CodexCache.FormatLinkID(SelectTool.Instance.selected.PrefabID().ToString());
            text = text.Replace("BABY", string.Empty);
        }
        else if ((UnityEngine.Object)component4 != (UnityEngine.Object)null)
        {
            text = CodexCache.FormatLinkID(SelectTool.Instance.selected.PrefabID().ToString());
            text = text.Replace("SEED", string.Empty);
        }
        else if ((UnityEngine.Object)component5 != (UnityEngine.Object)null)
        {
            if ((UnityEngine.Object)component5.parentObject.Get() != (UnityEngine.Object)null)
            {
                text = CodexCache.FormatLinkID(component5.parentObject.Get().PrefabID().ToString());
            }
            else if ((UnityEngine.Object)component5.GetComponent <TreeBud>() != (UnityEngine.Object)null)
            {
                text = CodexCache.FormatLinkID(component5.GetComponent <TreeBud>().buddingTrunk.Get().PrefabID().ToString());
            }
        }
        else
        {
            text = CodexCache.FormatLinkID(SelectTool.Instance.selected.PrefabID().ToString());
        }
        if (CodexCache.entries.ContainsKey(text) || CodexCache.FindSubEntry(text) != null)
        {
            return(text);
        }
        return(string.Empty);
    }