Esempio n. 1
0
 public override void ResolveReferences()
 {
     base.ResolveReferences();
     if (workTableSpeedStat == null)
     {
         workTableSpeedStat = StatDefOf.WorkTableWorkSpeedFactor;
     }
     if (workTableEfficiencyStat == null)
     {
         workTableEfficiencyStat = StatDefOf.WorkTableEfficiencyFactor;
     }
     for (int i = 0; i < ingredients.Count; i++)
     {
         ingredients[i].ResolveReferences();
     }
     if (fixedIngredientFilter != null)
     {
         fixedIngredientFilter.ResolveReferences();
     }
     if (defaultIngredientFilter == null)
     {
         defaultIngredientFilter = new ThingFilter();
         if (fixedIngredientFilter != null)
         {
             defaultIngredientFilter.CopyAllowancesFrom(fixedIngredientFilter);
         }
     }
     defaultIngredientFilter.ResolveReferences();
 }
Esempio n. 2
0
 public override void ResolveReferences()
 {
     base.ResolveReferences();
     DeepProfiler.Start("Stat refs");
     try
     {
         if (workTableSpeedStat == null)
         {
             workTableSpeedStat = StatDefOf.WorkTableWorkSpeedFactor;
         }
         if (workTableEfficiencyStat == null)
         {
             workTableEfficiencyStat = StatDefOf.WorkTableEfficiencyFactor;
         }
     }
     finally
     {
         DeepProfiler.End();
     }
     DeepProfiler.Start("ingredients reference resolve");
     try
     {
         for (int i = 0; i < ingredients.Count; i++)
         {
             ingredients[i].ResolveReferences();
         }
     }
     finally
     {
         DeepProfiler.End();
     }
     DeepProfiler.Start("fixedIngredientFilter.ResolveReferences()");
     try
     {
         if (fixedIngredientFilter != null)
         {
             fixedIngredientFilter.ResolveReferences();
         }
     }
     finally
     {
         DeepProfiler.End();
     }
     DeepProfiler.Start("defaultIngredientFilter setup");
     try
     {
         if (defaultIngredientFilter == null)
         {
             defaultIngredientFilter = new ThingFilter();
             if (fixedIngredientFilter != null)
             {
                 defaultIngredientFilter.CopyAllowancesFrom(fixedIngredientFilter);
             }
         }
     }
     finally
     {
         DeepProfiler.End();
     }
     DeepProfiler.Start("defaultIngredientFilter.ResolveReferences()");
     try
     {
         defaultIngredientFilter.ResolveReferences();
     }
     finally
     {
         DeepProfiler.End();
     }
 }