예제 #1
0
        public static void Uploaded(this ResearchProjectDef tech, float amount, Thing location)
        {
            if (tech == null)
            {
                Log.Error("Tried to upload a null tech.");
                return;
            }
            float num = Find.ResearchManager.GetProgress(tech);

            num += amount;
            Dictionary <ResearchProjectDef, float> progress = (Dictionary <ResearchProjectDef, float>)progressInfo.GetValue(Find.ResearchManager);

            progress[tech] = num;
            if (tech.IsFinished)
            {
                tech.Unlock(location, false);
            }
        }