private void CheckBuyResearch()
 {
     if (activeResearch != null)
     {
         ResearchPointInventory researchPointInventory = (!UseGlobalPointInventory) ? activeResearch.progressInventory : globalPointInventory;
         if (activeResearch.tech.CanAfford(researchPointInventory))
         {
             foreach (KeyValuePair <string, float> item in activeResearch.tech.costsByResearchTypeID)
             {
                 researchPointInventory.RemoveResearchPoints(item.Key, item.Value);
             }
             activeResearch.Purchased();
             Game.Instance.Trigger(-107300940, activeResearch.tech);
             GetNextTech();
         }
     }
 }
Exemplo n.º 2
0
            public static void Postfix()
            {
                if (CustomGameSettings.Instance.GetCurrentQualitySetting(StartWithAllResearchPatches.StartWithAllResearch).id != "Enabled")
                {
                    return;
                }

                foreach (Tech tech in Db.Get().Techs.resources)
                {
                    if (!tech.IsComplete())
                    {
                        TechInstance ti = Research.Instance.Get(tech);
                        ti.Purchased();
                        Game.Instance.Trigger(-107300940, (object)tech);
                    }
                }
            }