17 RecipeUpdater.mode = _mode;
19 this.Enumerator = this.RunRecipe().GetEnumerator();
22 for (
int i = 0; i < 1000; i++)
25 if (this.Enumerator ==
null)
34 public void FixedUpdate()
36 if (this.Enumerator ==
null)
40 if (!this.Enumerator.MoveNext())
42 this.Enumerator =
null;
47 public IEnumerable RunRecipe()
53 for (
int i = this.pos.x - 1; i <
this.pos.x + 2; i++)
55 if (i >= 0 && i <
EClass._map.Size)
57 for (
int j = this.pos.z - 1; j <
this.pos.z + 2; j++)
59 if (j >= 0 && j <
EClass._map.Size)
62 if (cell.detail !=
null && cell.detail.things.Count != 0)
65 if (effect !=
null && effect.IsFire)
69 foreach (
Thing thing
in cell.detail.things)
71 if (thing.IsInstalled)
73 if (thing.trait.IsFactory)
77 if (thing.trait.ToggleType == ToggleType.Fire && thing.isOn)
98 for (
int k = this.pos.x - 1; k <
this.pos.x + 2; k++)
100 if (k >= 0 && k <
EClass._map.Size)
102 for (
int l = this.pos.z - 1; l <
this.pos.z + 2; l++)
104 if (l >= 0 && l <
EClass._map.Size)
107 if (cell.detail !=
null && cell.detail.things.Count != 0)
109 foreach (
Thing thing3
in cell.detail.things)
111 if (!thing3.isNPCProperty)
113 if (thing3.trait.IsContainer)
115 if (!thing3.IsInstalled)
120 else if (thing3.IsInstalled)
135 List<Recipe> list =
new List<Recipe>();
139 string id = recipe.id;
146 using (List<
Recipe.
Ingredient>.Enumerator enumerator3 = recipe.ingredients.GetEnumerator())
148 while (enumerator3.MoveNext())
150 if (enumerator3.Current.thing ==
null)
163 foreach (
Recipe item
in list)
186 public IEnumerable RunDisassemble()
195 foreach (
Card card
in EClass.pc.pos.ListCards(
false))
221 public IEnumerator Enumerator;
227 public static List<Thing> listD =
new List<Thing>();
230 public static List<Thing> lastListD =
new List<Thing>();
233 public static HashSet<Recipe> recipes =
new HashSet<Recipe>();
236 public static HashSet<Recipe> lastRecipes =
new HashSet<Recipe>();
239 public static HashSet<string> factories =
new HashSet<string>();
242 public static RecipeUpdater.Mode mode;
245 public static int sync;
248 public static bool dirty;