// Token: 0x0600008F RID: 143 RVA: 0x00007CD8 File Offset: 0x00005ED8
        public override IEnumerable <Gizmo> GetGizmos()
        {
            foreach (var gizmo in base.GetGizmos())
            {
                yield return(gizmo);
            }

            if (Faction != Faction.OfPlayer)
            {
                yield break;
            }

            string SelectDesc = "MSDrugMix.ChemSelectDesc".Translate();

            if (MixerThingDef == null)
            {
                string NoChem = "MSDrugMix.ChemSelect".Translate();
                yield return(new Command_Action
                {
                    defaultLabel = NoChem,
                    icon = ContentFinder <Texture2D> .Get(chemicalTexPath),
                    defaultDesc = SelectDesc,
                    action = MSMixerSelectChem
                });
            }
            else
            {
                var IconToUse   = MSDrugMixUtility.GetMSMixIcon(MixerThingDef);
                var LabelDetail = MixerThingDef.label.CapitalizeFirst();
                LabelDetail = string.Concat(LabelDetail, " [", NumProd, "] ");
                if (TotalProdWorkTicks > 0)
                {
                    LabelDetail = LabelDetail + " (" +
                                  (int)((TotalProdWorkTicks - ProdWorkTicks) / (float)TotalProdWorkTicks * 100f) +
                                  "%)";
                }

                yield return(new Command_Action
                {
                    defaultLabel = LabelDetail,
                    icon = IconToUse,
                    defaultDesc = SelectDesc,
                    action = MSMixerSelectChem
                });
            }

            string LabelProduce     = "MSDrugMix.Production".Translate();
            string LabelProduceDesc = "MSDrugMix.ProductionDesc".Translate();

            if (isProducing)
            {
                if (MixerThingDef != null)
                {
                    if (MSDrugMixUtility.RCPProdValues(MixerThingDef, out _, out var minProd,
                                                       out var maxProd, out _))
                    {
                        LabelProduce +=
                            "MSDrugMix.ProdLabelRange".Translate(minProd.ToString(), maxProd.ToString());
                    }
                    else
                    {
                        LabelProduce += "MSDrugMix.ProdLabelERR".Translate();
                    }
                }
                else
                {
                    LabelProduce += "MSDrugMix.ProdNoChem".Translate();
                }
            }
        // Token: 0x0600008D RID: 141 RVA: 0x00007594 File Offset: 0x00005794
        private bool ValidateRecipe(ThingDef t, out bool CanUseMax, out List <RCPItemCanUse> FinalList, out int MinProd,
                                    out int MaxProd, out int Ticks)
        {
            CanUseMax = true;
            FinalList = null;
            MinProd   = 0;
            MaxProd   = 0;
            Ticks     = 0;
            if (debug && Find.TickManager.TicksGame % 100 == 0)
            {
                Log.Message("ValRep: " + t.defName);
            }

            if (!MSDrugMixUtility.RCPProdValues(t, out var ticks, out var minProd, out var maxProd, out var Res))
            {
                return(false);
            }

            Ticks   = ticks;
            MinProd = minProd;
            MaxProd = maxProd;
            if (debug)
            {
                Log.Message(string.Concat("RCPVals: Ticks: ", ticks.ToString(), " minProd: ", minProd.ToString(),
                                          " maxProd: ", maxProd.ToString(), " Res: ", Res));
            }

            if (!ResearchProjectDef.Named(Res).IsFinished || minProd <= 0 || maxProd <= 0 || ticks <= 0)
            {
                if (!ResearchProjectDef.Named(Res).IsFinished)
                {
                    Log.Message("MSDrugMix.ErrorRes".Translate(MixerThingDef.label));
                    isProducing        = false;
                    NumProd            = 0;
                    ProdWorkTicks      = 0;
                    TotalProdWorkTicks = 0;
                }
                else
                {
                    Log.Message("MSDrugMix.ErrorRCP".Translate(MixerThingDef.label, ticks.ToString(),
                                                               minProd.ToString(), maxProd.ToString()));
                    isProducing        = false;
                    NumProd            = 0;
                    ProdWorkTicks      = 0;
                    TotalProdWorkTicks = 0;
                }

                return(false);
            }

            var listRCP = MSDrugMixUtility.GetRCPList(t);

            if (listRCP.Count <= 0)
            {
                if (debug)
                {
                    Log.Message("RCP is False.");
                }

                return(false);
            }

            if (debug)
            {
                Log.Message("RCP Listings: " + listRCP.Count);
            }

            var RCPListPotentials = new List <RCPItemCanUse>();
            var RCPGroups         = new List <int>();

            foreach (var listItem in listRCP)
            {
                var MaterialsMin    = 0;
                var MaterialsMax    = 0;
                var RCPItem         = listItem;
                var RCPMinNumNeeded = (int)Math.Round(RCPItem.num * minProd * RCPItem.ratio);
                var RCPMaxNumNeeded = (int)Math.Round(RCPItem.num * maxProd * RCPItem.ratio);
                if (HasEnoughMaterialInHoppers(RCPItem.def, RCPMinNumNeeded, true))
                {
                    MaterialsMin = RCPMinNumNeeded;
                }

                if (HasEnoughMaterialInHoppers(RCPItem.def, RCPMaxNumNeeded, false))
                {
                    MaterialsMax = RCPMaxNumNeeded;
                }

                if (MaterialsMin > 0 || MaterialsMax > 0)
                {
                    RCPListPotentials.Add(new RCPItemCanUse
                    {
                        def = RCPItem.def,
                        Min = MaterialsMin,
                        Max = MaterialsMax,
                        Grp = RCPItem.mixgrp
                    });
                }

                if (!RCPGroups.Contains(RCPItem.mixgrp))
                {
                    RCPGroups.Add(RCPItem.mixgrp);
                }
            }

            if (debug)
            {
                Log.Message(
                    "InnerRecipe List: Groups: " + RCPGroups.Count + " , Potentials: " + RCPListPotentials.Count);
            }

            FinalList = new List <RCPItemCanUse>();
            var NotAllGroups = false;

            if (RCPGroups.Count > 0)
            {
                foreach (var grp in RCPGroups)
                {
                    var foundGroup = false;
                    if (RCPListPotentials.Count > 0)
                    {
                        RCPItemCanUse bestthingsofar = default;
                        var           best           = false;
                        var           bestmax        = false;
                        foreach (var itemchk in RCPListPotentials)
                        {
                            if (itemchk.Grp != grp)
                            {
                                continue;
                            }

                            foundGroup = true;
                            if (itemchk.Min <= 0)
                            {
                                continue;
                            }

                            if (itemchk.Max > 0)
                            {
                                if (bestmax)
                                {
                                    continue;
                                }

                                bestthingsofar.def = itemchk.def;
                                bestthingsofar.Min = itemchk.Min;
                                bestthingsofar.Max = itemchk.Max;
                                bestthingsofar.Grp = itemchk.Grp;
                                best    = true;
                                bestmax = true;
                            }
                            else if (!best)
                            {
                                bestthingsofar.def = itemchk.def;
                                bestthingsofar.Min = itemchk.Min;
                                bestthingsofar.Max = itemchk.Max;
                                bestthingsofar.Grp = itemchk.Grp;
                                best = true;
                            }
                        }

                        if (!bestmax)
                        {
                            bestthingsofar.Max = 0;
                        }

                        FinalList.Add(bestthingsofar);
                    }

                    if (foundGroup)
                    {
                        continue;
                    }

                    NotAllGroups = true;
                    DoNotFoundGroupsOverlay(this, t, grp);
                }
            }

            if (FinalList.Count > 0)
            {
                for (var l = 0; l < FinalList.Count; l++)
                {
                    if (FinalList[l].Max == 0)
                    {
                        CanUseMax = false;
                    }
                }
            }

            if (NotAllGroups)
            {
                if (debug)
                {
                    Log.Message("RCP is False. Not all inputs found");
                }

                return(false);
            }

            if (debug)
            {
                Log.Message("RCP is True. with (" + FinalList.Count + ") final list items");
            }

            return(true);
        }