示例#1
0
        private Tech AISelectPartialTech(StrategicAI ai)
        {
            Tech tech1 = (Tech)null;

            if (AIResearchFramework.AIGetResearchingTech(ai) == null)
            {
                List <Tech> techList = AIResearchFramework.AISelectAvailableTechs(ai, new AIResearchModes?(), new TechFamilies?());
                if (techList.Count > 0)
                {
                    int num = 0;
                    foreach (Tech tech2 in techList)
                    {
                        int techProgress = AIResearchFramework.AIGetTechProgress(ai, tech2);
                        if (techProgress > num)
                        {
                            num   = techProgress;
                            tech1 = tech2;
                        }
                    }
                }
            }
            if (this._log != null && tech1 != null)
            {
                this._log.Print(string.Format("Resuming {0}", (object)tech1.Id));
            }
            return(tech1);
        }