Esempio n. 1
0
        private void CalcCreations(long timeMS, StringBuilder infoBuilder)
        {
            CDouble cDouble = this.State.CreationSpeed(timeMS) / 3L;
            long    num     = timeMS;
            bool    flag    = false;

            if ((this.State.GameSettings.LastCreation != null && this.State.GameSettings.LastCreation.TypeEnum == Creation.CreationType.Shadow_clone) || (this.State.GameSettings.CreateShadowClonesIfNotMax && this.State.Clones.Count < this.State.Clones.MaxShadowClones))
            {
                flag = true;
            }
            if (flag)
            {
                Creation creation = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Shadow_clone);
                Creation.UpdateDurationMulti(this.State);
                CDouble cDouble2 = cDouble / creation.DurationInMS * (this.State.PremiumBoni.CreationCountBoni(true) + 1);
                if (cDouble2 > timeMS / 30L * (this.State.PremiumBoni.CreationCountBoni(true) + 1))
                {
                    cDouble2 = timeMS / 30L * (this.State.PremiumBoni.CreationCountBoni(true) + 1);
                }
                if (cDouble2 > 0)
                {
                    CDouble cDouble3 = timeMS / cDouble2;
                    bool    flag2    = this.State.GameSettings.LastCreation != null && this.State.GameSettings.LastCreation.TypeEnum == Creation.CreationType.Shadow_clone;
                    if (cDouble2 + creation.Count > this.State.Clones.MaxShadowClones && this.State.GameSettings.CreateShadowClonesIfNotMax && !flag2)
                    {
                        cDouble2 = this.State.Clones.MaxShadowClones - creation.Count;
                        num     -= cDouble2.ToLong() * cDouble3.ToLong();
                    }
                    creation.TotalCreated += cDouble2;
                    this.State.Clones.TotalClonesCreated          += cDouble2;
                    this.State.Statistic.TotalShadowClonesCreated += cDouble2;
                    if (cDouble2 > 0)
                    {
                        infoBuilder.Append("- created ").Append(cDouble2.GuiText).Append(" Shadow Clones\n");
                    }
                    if (this.State.Clones.Count + cDouble2 > this.State.Clones.MaxShadowClones)
                    {
                        cDouble2 = this.State.Clones.MaxShadowClones - this.State.Clones.Count;
                    }
                    this.State.Clones.Count = this.State.Clones.Count + cDouble2.ToInt();
                    if (this.State.Clones.Count < this.State.Clones.MaxShadowClones)
                    {
                        num = 0L;
                    }
                }
            }
            if (this.State.GameSettings.LastCreation != null && this.State.GameSettings.LastCreation.TypeEnum != Creation.CreationType.Shadow_clone && App.CurrentPlattform == Plattform.Android)
            {
                while (num > 0L)
                {
                    cDouble = this.State.CreationSpeed(num) / 3L;
                    Creation creation2 = this.State.GameSettings.LastCreation;
                    CDouble  cDouble4  = creation2.DurationInMS;
                    if (cDouble4 < 30)
                    {
                        cDouble4 = 30;
                    }
                    CDouble cDouble5 = cDouble / cDouble4;
                    if (cDouble5 < 1)
                    {
                        creation2.currentDuration += cDouble.ToLong();
                        break;
                    }
                    cDouble5.Round();
                    cDouble5 *= this.State.PremiumBoni.CreationCountBoni(true) + 1;
                    List <CreationCost> list = CreationCost.RequiredCreations(creation2.TypeEnum, cDouble5.ToLong(), true);
                    bool flag3 = true;
                    foreach (CreationCost current in list)
                    {
                        if (!CreationCost.HasCreations(this.State, current, this.State.GameSettings.AutoBuyCreations))
                        {
                            flag3 = false;
                        }
                    }
                    if (!flag3)
                    {
                        cDouble5 = this.State.GameSettings.CreationToCreateCount;
                        if (cDouble5 == 0)
                        {
                            cDouble5 = 1;
                        }
                        list  = CreationCost.RequiredCreations(creation2.TypeEnum, cDouble5.ToLong(), true);
                        flag3 = true;
                        foreach (CreationCost current2 in list)
                        {
                            if (!CreationCost.HasCreations(this.State, current2, this.State.GameSettings.AutoBuyCreations))
                            {
                                flag3 = false;
                            }
                        }
                        if (flag3)
                        {
                            bool flag4 = true;
                            while (flag4)
                            {
                                cDouble5 *= 2;
                                list      = CreationCost.RequiredCreations(creation2.TypeEnum, cDouble5.ToLong(), true);
                                foreach (CreationCost current3 in list)
                                {
                                    if (!CreationCost.HasCreations(this.State, current3, this.State.GameSettings.AutoBuyCreations))
                                    {
                                        flag4     = false;
                                        cDouble5 /= 2;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                    if (!flag3)
                    {
                        infoBuilder.Append("- you failed to create " + creation2.Name + " because of missing prerequisites or divinity, so you created stones instead.\n");
                        list      = new List <CreationCost>();
                        creation2 = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Stone);
                        cDouble4  = creation2.DurationInMS;
                        if (cDouble4 < 30)
                        {
                            cDouble4 = 30;
                        }
                        cDouble5 = cDouble / cDouble4 * (this.State.PremiumBoni.CreationCountBoni(true) + 1);
                    }
                    CDouble cDouble6 = cDouble5 + creation2.Count;
                    CDouble cDouble7 = -1;
                    if (creation2.NextAtCount > 0)
                    {
                        if (this.State.GameSettings.CreationsNextAtMode == 1)
                        {
                            cDouble7 = creation2.NextAtCount - creation2.Count;
                        }
                        else if (this.State.GameSettings.CreationsNextAtMode == 2)
                        {
                            cDouble7 = creation2.NextAtCount - creation2.TotalCreated;
                        }
                    }
                    if (cDouble7 != -1 && cDouble5 > cDouble7 && flag3)
                    {
                        if (cDouble7 > 0)
                        {
                            cDouble5 = cDouble7;
                            CDouble cDouble8 = (cDouble5 * cDouble4 / (this.State.PremiumBoni.CreationCountBoni(true) + 1)).ToLong();
                            cDouble8 = cDouble8 / this.State.PremiumBoni.CreationDopingDivider / (100 + this.State.PremiumBoni.CreatingSpeedUpPercent(true)) * 100;
                            num     -= cDouble8.ToLong();
                        }
                        else
                        {
                            cDouble5 = 0;
                        }
                    }
                    else
                    {
                        num = 0L;
                    }
                    if (num > 0L && this.State.GameSettings.LastCreation.TypeEnum != Creation.CreationType.Universe)
                    {
                        Creation creation3 = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == this.State.GameSettings.LastCreation.TypeEnum + 1);
                        if (!creation3.GodToDefeat.IsDefeated)
                        {
                            break;
                        }
                        this.State.GameSettings.LastCreation = creation3;
                    }
                    else
                    {
                        num = 0L;
                    }
                    if (cDouble5 > 1)
                    {
                        list = CreationCost.RequiredCreations(creation2.TypeEnum, cDouble5.ToLong(), true);
                        using (List <CreationCost> .Enumerator enumerator4 = list.GetEnumerator())
                        {
                            while (enumerator4.MoveNext())
                            {
                                CreationCost cost      = enumerator4.Current;
                                Creation     creation4 = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == cost.TypeEnum);
                                creation4.Count -= cost.CountNeeded;
                                if (creation4.Count < 0)
                                {
                                    Log.Info(string.Concat(new object[]
                                    {
                                        creation4.Name,
                                        " had ",
                                        creation4.Count,
                                        "!"
                                    }));
                                    creation4.Count = 0;
                                }
                            }
                        }
                        cDouble5.Floor();
                        creation2.Count        += cDouble5;
                        creation2.TotalCreated += cDouble5;
                        this.State.CheckForAchievement(creation2);
                        this.State.CheckForAchievement(creation2);
                        this.State.CheckForAchievement(creation2);
                        infoBuilder.Append("- you created ").Append(cDouble5.GuiText).Append(" " + creation2.Name + "\n\n");
                    }
                }
                num = 0L;
            }
            if (this.State.Statistic.HasStartedUniverseChallenge)
            {
                Creation creation5 = this.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Universe);
                creation5.FinishUUC(this.State);
            }
        }
        private void Show()
        {
            if (CreatingUi.scrollBarsToZero)
            {
                this.scrollPosition         = Vector2.zero;
                CreatingUi.scrollBarsToZero = false;
            }
            if (this.IsAchievement)
            {
                GuiBase.ShowAchievements(App.State.CreatingAchievements, "creating");
                return;
            }
            GUIStyle style = GUI.skin.GetStyle("Label");

            if (this.showAutoBuyOptions)
            {
                this.ShowAutoBuyOptions();
            }
            else if (this.creationToShow != null)
            {
                this.ShowBuyCreations();
            }
            else
            {
                style.fontSize = GuiBase.FontSize(16);
                GUI.Box(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
                GUI.BeginGroup(new Rect(GuiBase.Width(280f), GuiBase.Height(110f), GuiBase.Width(670f), GuiBase.Height(480f)));
                int num = 20;
                GUI.Label(new Rect(GuiBase.Width(345f), GuiBase.Height((float)(num - 7)), GuiBase.Width(200f), GuiBase.Height(30f)), new GUIContent("Create Clones if not max", "If this is on, shadow clones will be created instead of the selected creation if they are not maxed already."));
                App.State.GameSettings.CreateShadowClonesIfNotMax = GUI.Toggle(new Rect(GuiBase.Width(580f), GuiBase.Height((float)(num - 5)), GuiBase.Width(70f), GuiBase.Height(30f)), App.State.GameSettings.CreateShadowClonesIfNotMax, new GUIContent(string.Empty));
                if (App.State.IsBuyUnlocked)
                {
                    string text = "If this is on, missing creations will be bought automatically if you have enough divinity.";
                    if (App.State.PremiumBoni.AutoBuyCostReduction < 20)
                    {
                        text = string.Concat(new object[]
                        {
                            text,
                            "\nBut beware: there is an additional ",
                            20 - App.State.PremiumBoni.AutoBuyCostReduction,
                            "% transaction fee!"
                        });
                    }
                    App.State.GameSettings.AutoBuyCreations = GUI.Toggle(new Rect(GuiBase.Width(580f), GuiBase.Height((float)(num + 22)), GuiBase.Width(70f), GuiBase.Height(30f)), App.State.GameSettings.AutoBuyCreations, new GUIContent(string.Empty));
                    if (GUI.Button(new Rect(GuiBase.Width(345f), GuiBase.Height((float)(num + 20)), GuiBase.Width(220f), GuiBase.Height(30f)), new GUIContent("Auto buy missing creations", text + "\nClick this button for more advanced settings.")))
                    {
                        this.showAutoBuyOptions = true;
                    }
                }
                num += 50;
                if (App.State.PremiumBoni.CreationCountBoni(true) > 0)
                {
                    num -= 25;
                    if (App.State.GameSettings.CreationToCreateCount == 0)
                    {
                        App.State.GameSettings.CreationToCreateCount = 1;
                    }
                    int num2 = App.State.PremiumBoni.CreationCountBoni(true).ToInt() + 1;
                    GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height(15f), GuiBase.Width(155f), GuiBase.Height(30f)), new GUIContent("Creations to create: ", "Cost of resources to create one creation with 1 = 100%, 2 = 195% ... 10 = 775%, 11 = 825%, 12 = 875%..., Creation/s is 100% + 5% for each more than one."));
                    if (App.State.IsCrystalFactoryAvailable)
                    {
                        App.State.GameSettings.MaxAfterEquipCrystal = GUI.Toggle(new Rect(GuiBase.Width(240f), GuiBase.Height((float)(num - 25)), GuiBase.Width(70f), GuiBase.Height(30f)), App.State.GameSettings.MaxAfterEquipCrystal, new GUIContent(string.Empty, "If this is on, your creation count will be adjusted to your maximum count after equipping crystals."));
                    }
                    if (App.CurrentPlattform == Plattform.Android)
                    {
                        GUIStyle textField = Gui.ChosenSkin.textField;
                        if (GUI.Button(new Rect(GuiBase.Width(185f), GuiBase.Height(15f), GuiBase.Width(45f), GuiBase.Height(25f)), App.State.GameSettings.CreationToCreateCount.ToString(), textField))
                        {
                            base.ShowNumberInput("Creations to create (Max = " + (App.State.PremiumBoni.CreationCountBoni(true).ToInt() + 1) + ")", App.State.GameSettings.CreationToCreateCount, App.State.PremiumBoni.CreationCountBoni(true).ToInt() + 1, delegate(CDouble x)
                            {
                                App.State.GameSettings.CreationToCreateCount = x.ToInt();
                            });
                        }
                    }
                    else
                    {
                        this.CreationInput = GUI.TextField(new Rect(GuiBase.Width(185f), GuiBase.Height(15f), GuiBase.Width(45f), GuiBase.Height(25f)), App.State.GameSettings.CreationToCreateCount.ToString());
                    }
                    Rect position = new Rect(GuiBase.Width(30f), GuiBase.Height(50f), GuiBase.Width(200f), GuiBase.Height(30f));
                    if (position.Contains(Event.current.mousePosition) && this.creationCount != App.State.GameSettings.CreationToCreateCount)
                    {
                        this.creationCount = App.State.GameSettings.CreationToCreateCount;
                        foreach (Creation current in App.State.AllCreations)
                        {
                            current.InitSubItemCost(0);
                        }
                    }
                    App.State.GameSettings.CreationToCreateCount = (int)GUI.HorizontalSlider(position, (float)App.State.GameSettings.CreationToCreateCount, 1f, (float)num2);
                    num += 25;
                }
                style.alignment = TextAnchor.UpperCenter;
                style.fontStyle = FontStyle.Bold;
                GUI.Label(new Rect(GuiBase.Width(25f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), "You are creating:");
                if (App.State.CreatingSpeedBoniDuration > 0L)
                {
                    GUI.Label(new Rect(GuiBase.Width(235f), GuiBase.Height((float)num), GuiBase.Width(400f), GuiBase.Height(30f)), "300% creation speed for the next " + Conv.MsToGuiText(App.State.CreatingSpeedBoniDuration, true) + "!");
                }
                style.fontStyle = FontStyle.Normal;
                num            += 35;
                Creation activeCreation = App.State.GameSettings.LastCreation;
                if (activeCreation == null)
                {
                    activeCreation = App.State.AllCreations.FirstOrDefault((Creation x) => x.IsActive);
                }
                if (activeCreation == null)
                {
                    activeCreation = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == Creation.CreationType.Shadow_clone);
                }
                GuiBase.CreateProgressBar(num, activeCreation.getPercent(), activeCreation.Name, activeCreation.Description, GuiBase.progressBg, GuiBase.progressFgBlue);
                style.alignment = TextAnchor.UpperLeft;
                GUI.Label(new Rect(GuiBase.Width(255f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), "You have: " + activeCreation.Count.ToGuiText(true));
                string text2 = "Change creation";
                if (this.ChooseCreationIsOpen)
                {
                    text2 = "More Info";
                }
                if (GUI.Button(new Rect(GuiBase.Width(485f), GuiBase.Height((float)(num + 10)), GuiBase.Width(140f), GuiBase.Height(30f)), text2))
                {
                    this.ChooseCreationIsOpen = !this.ChooseCreationIsOpen;
                    if (this.ChooseCreationIsOpen)
                    {
                        this.scrollPosition = this.scrollPositionAllCreations;
                    }
                    else
                    {
                        this.scrollPositionAllCreations = this.scrollPosition;
                        this.scrollPosition             = Vector2.zero;
                    }
                }
                num += 25;
                GUI.Label(new Rect(GuiBase.Width(255f), GuiBase.Height((float)num), GuiBase.Width(250f), GuiBase.Height(30f)), "You created: " + activeCreation.TotalCreated.ToGuiText(true));
                num += 35;
                List <CreationCost> list = CreationCost.RequiredCreations(activeCreation.TypeEnum, 0L, false);
                int num3 = 290;
                if (this.ChooseCreationIsOpen)
                {
                    style.fontStyle = FontStyle.Bold;
                    GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)num), GuiBase.Width(150f), GuiBase.Height(30f)), "Creation");
                    GUI.Label(new Rect(GuiBase.Width(160f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(30f)), "Count", style);
                    GUI.Label(new Rect(GuiBase.Width(290f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(30f)), "Next At", style);
                    GUI.Label(new Rect(GuiBase.Width(375f), GuiBase.Height((float)num), GuiBase.Width(150f), GuiBase.Height(30f)), "Achieve.", style);
                    style.fontStyle = FontStyle.Normal;
                    GUI.Label(new Rect(GuiBase.Width(475f), GuiBase.Height((float)num), GuiBase.Width(40f), GuiBase.Height(30f)), new GUIContent("N A", "Off will ignore the next at. 1 will go to the next creation if the current number reached the count. 2 will go to the next creation if you created the count by yourself."), style);
                    App.State.GameSettings.CreationsNextAtMode = GUI.Toolbar(new Rect(GuiBase.Width(510f), GuiBase.Height((float)(num - 5)), GuiBase.Width(135f), GuiBase.Height(30f)), App.State.GameSettings.CreationsNextAtMode, this.toolbarNextAt);
                    num  += 35;
                    num3 -= 35;
                }
                this.scrollPosition = GuiBase.TouchScrollView(new Rect(GuiBase.Width(0f), GuiBase.Height((float)num), GuiBase.Width(660f), GuiBase.Height((float)num3)), this.scrollPosition, new Rect(0f, GuiBase.Height((float)num), GuiBase.Width(620f), GuiBase.Height((float)this.svHeight)));
                Achievement first = null;
                if (this.ChooseCreationIsOpen)
                {
                    for (int i = 0; i < App.State.AllCreations.Count; i++)
                    {
                        Creation creation = App.State.AllCreations[i];
                        if (creation.IsActive)
                        {
                            style.fontStyle = FontStyle.Bold;
                        }
                        GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)num), GuiBase.Width(145f), GuiBase.Height(30f)), new GUIContent(creation.Name, creation.Description), style);
                        GUI.Label(new Rect(GuiBase.Width(160f), GuiBase.Height((float)num), GuiBase.Width(150f), GuiBase.Height(35f)), creation.Count.ToGuiText(true), style);
                        if (App.CurrentPlattform == Plattform.Android && creation.TypeEnum != Creation.CreationType.Shadow_clone)
                        {
                            GUIStyle textField2 = Gui.ChosenSkin.textField;
                            if (GUI.Button(new Rect(GuiBase.Width(290f), GuiBase.Height((float)num), GuiBase.Width(70f), GuiBase.Height(25f)), creation.NextAtCount + string.Empty, textField2))
                            {
                                base.ShowNumberInput("Next at for " + creation.Name, creation.NextAtCount, 2147483647, delegate(CDouble x)
                                {
                                    creation.NextAtCount = x.ToInt();
                                });
                            }
                        }
                        else if (creation.TypeEnum != Creation.CreationType.Shadow_clone)
                        {
                            creation.NextAtString = GUI.TextField(new Rect(GuiBase.Width(290f), GuiBase.Height((float)num), GuiBase.Width(70f), GuiBase.Height(25f)), creation.NextAtCount.ToString());
                        }
                        if (!creation.GodToDefeat.IsDefeated)
                        {
                            GUI.Label(new Rect(GuiBase.Width(365f), GuiBase.Height((float)num), GuiBase.Width(300f), GuiBase.Height(30f)), "Defeat " + creation.GodToDefeat.Name + " to unlock", style);
                        }
                        else
                        {
                            first = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.IntEnum == (int)creation.TypeEnum);
                            if (first != null)
                            {
                                this.AddAchievementImg(first, 370, num, 25);
                                Achievement achievement = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.Id == first.Id + 1);
                                this.AddAchievementImg(achievement, 405, num, 25);
                                Achievement achievement2 = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.Id == first.Id + 2);
                                this.AddAchievementImg(achievement2, 440, num, 25);
                            }
                            if (App.State.IsBuyUnlocked && creation.CanBuy && creation.TypeEnum != Creation.CreationType.Shadow_clone && GUI.Button(new Rect(GuiBase.Width(565f), GuiBase.Height((float)num), GuiBase.Width(60f), GuiBase.Height(25f)), "Buy"))
                            {
                                this.creationToShow = creation;
                            }
                            if (GUI.Button(new Rect(GuiBase.Width(475f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(25f)), "Create"))
                            {
                                bool flag = false;
                                foreach (Creation current2 in App.State.AllCreations)
                                {
                                    if (!current2.GodToDefeat.IsDefeated && current2.IsActive)
                                    {
                                        flag = true;
                                    }
                                }
                                if (App.State.PrinnyBaal.IsFighting)
                                {
                                    flag = true;
                                }
                                if (flag)
                                {
                                    GuiBase.ShowToast("You can't create something while you fight a god!");
                                    App.State.GameSettings.LastCreation = creation;
                                }
                                else
                                {
                                    foreach (Creation current3 in App.State.AllCreations)
                                    {
                                        current3.IsActive = false;
                                    }
                                    creation.IsActive = true;
                                    App.State.GameSettings.LastCreation = creation;
                                    foreach (UltimateBeingV2 current4 in App.State.HomePlanet.UltimateBeingsV2)
                                    {
                                        current4.isCreating = false;
                                    }
                                }
                            }
                        }
                        if (creation.IsActive)
                        {
                            style.fontStyle = FontStyle.Normal;
                        }
                        num += 30;
                    }
                }
                else
                {
                    first = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.IntEnum == (int)activeCreation.TypeEnum);
                    if (first != null)
                    {
                        GUI.Label(new Rect(GuiBase.Width(35f), GuiBase.Height((float)(num + 10)), GuiBase.Width(200f), GuiBase.Height(50f)), "Achievements for " + activeCreation.Name + ":");
                        this.AddAchievementImg(first, 255, num, 40);
                        Achievement achievement3 = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.Id == first.Id + 1);
                        this.AddAchievementImg(achievement3, 315, num, 40);
                        Achievement achievement4 = App.State.CreatingAchievements.FirstOrDefault((Achievement x) => x.Id == first.Id + 2);
                        this.AddAchievementImg(achievement4, 375, num, 40);
                        num += 70;
                    }
                    if (list.Count > 0)
                    {
                        style.fontStyle = FontStyle.Bold;
                        int num4 = App.State.GameSettings.CreationToCreateCount;
                        if (num4 == 0)
                        {
                            num4 = 1;
                        }
                        GUI.Label(new Rect(GuiBase.Width(35f), GuiBase.Height((float)num), GuiBase.Width(210f), GuiBase.Height(50f)), string.Concat(new object[]
                        {
                            "Creations for ",
                            num4,
                            " x ",
                            activeCreation.Name
                        }));
                        if (activeCreation.Name.Length > 8)
                        {
                            num += 20;
                        }
                        style.alignment = TextAnchor.UpperCenter;
                        GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), " you need");
                        GUI.Label(new Rect(GuiBase.Width(335f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), " you have");
                        style.fontStyle = FontStyle.Normal;
                        num            += 30;
                        using (List <CreationCost> .Enumerator enumerator5 = list.GetEnumerator())
                        {
                            while (enumerator5.MoveNext())
                            {
                                CreationCost requirement = enumerator5.Current;
                                Creation     creation3   = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == requirement.TypeEnum);
                                GuiBase.CreateProgressBar(num, creation3.getPercent(), EnumName.Name(requirement.TypeEnum), creation3.Description, GuiBase.progressBg, GuiBase.progressFgBlue);
                                GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height((float)(num + 5)), GuiBase.Width(200f), GuiBase.Height(30f)), requirement.CountNeeded.ToGuiText(true));
                                GUI.Label(new Rect(GuiBase.Width(335f), GuiBase.Height((float)(num + 5)), GuiBase.Width(200f), GuiBase.Height(30f)), creation3.Count.ToGuiText(true));
                                if (App.State.IsBuyUnlocked && creation3.CanBuy && creation3.TypeEnum != Creation.CreationType.Shadow_clone && GUI.Button(new Rect(GuiBase.Width(545f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(30f)), "Buy"))
                                {
                                    this.creationToShow = creation3;
                                }
                                num += 35;
                            }
                        }
                        if (activeCreation.SubItemCreationCost.Count > 0)
                        {
                            num            += 10;
                            style.alignment = TextAnchor.UpperLeft;
                            style.fontStyle = FontStyle.Bold;
                            GUI.Label(new Rect(GuiBase.Width(35f), GuiBase.Height((float)num), GuiBase.Width(200f), GuiBase.Height(30f)), new GUIContent("Prerequisite Creations", "All creations needed to create the creations you need to create one." + activeCreation.Name));
                            style.alignment = TextAnchor.UpperCenter;
                            style.fontStyle = FontStyle.Normal;
                            num            += 30;
                            using (List <CreationCost> .Enumerator enumerator6 = activeCreation.SubItemCreationCost.GetEnumerator())
                            {
                                while (enumerator6.MoveNext())
                                {
                                    CreationCost requirement = enumerator6.Current;
                                    Creation     creation2   = App.State.AllCreations.FirstOrDefault((Creation x) => x.TypeEnum == requirement.TypeEnum);
                                    GuiBase.CreateProgressBar(num, creation2.getPercent(), EnumName.Name(requirement.TypeEnum), creation2.Description, GuiBase.progressBg, GuiBase.progressFgBlue);
                                    GUI.Label(new Rect(GuiBase.Width(210f), GuiBase.Height((float)(num + 5)), GuiBase.Width(200f), GuiBase.Height(30f)), requirement.CountNeeded.ToGuiText(true));
                                    GUI.Label(new Rect(GuiBase.Width(335f), GuiBase.Height((float)(num + 5)), GuiBase.Width(200f), GuiBase.Height(30f)), creation2.Count.ToGuiText(true));
                                    if (App.State.IsBuyUnlocked && creation2.CanBuy && creation2.TypeEnum != Creation.CreationType.Shadow_clone && GUI.Button(new Rect(GuiBase.Width(545f), GuiBase.Height((float)num), GuiBase.Width(80f), GuiBase.Height(30f)), "Buy"))
                                    {
                                        this.creationToShow = creation2;
                                    }
                                    num += 35;
                                }
                            }
                        }
                    }
                }
                this.svHeight = num - 150;
                GUI.EndScrollView();
                GUI.EndGroup();
            }
        }