14 id = SourceData.GetString(0),
15 _origin = SourceData.GetString(1),
16 name_JP = SourceData.GetString(2),
17 unit_JP = SourceData.GetString(3),
18 name = SourceData.GetString(4),
19 unit = SourceData.GetString(5),
20 tiles = SourceData.GetIntArray(6),
21 skins = SourceData.GetIntArray(7),
22 parse = SourceData.GetStringArray(8),
23 vals = SourceData.GetStringArray(9),
24 trait = SourceData.GetStringArray(11),
25 LV = SourceData.GetInt(12),
26 chance = SourceData.GetInt(13),
27 value = SourceData.GetInt(14),
28 weight = SourceData.GetInt(15),
29 recipeKey = SourceData.GetStringArray(16),
30 factory = SourceData.GetStringArray(17),
31 components = SourceData.GetStringArray(18),
32 defMat = SourceData.GetString(19),
33 category = SourceData.GetString(20),
34 tag = SourceData.GetStringArray(21),
35 detail_JP = SourceData.GetString(22),
36 detail = SourceData.GetString(23)
47 public override void RestorePref()
52 SourcePref sourcePref = (row2 !=
null) ? row2.pref :
null;
53 if (sourcePref ==
null &&
EClass.sources.asset.renames.ContainsKey(row.id))
56 sourcePref = ((row3 !=
null) ? row3.pref :
null);
63 dictionary[row4.id] = row4;
67 if (!row5.pref.UsePref && !row5._origin.IsEmpty())
70 row5.pref = IO.DeepCopy<
SourcePref>(row6.pref);
71 row5.pref.flags |= PrefFlag.UsePref;
77 public override void ValidatePref()
86 public override void OnAfterImportData()
91 dictionary[row.id] = row;
93 System.Reflection.FieldInfo[] fields =
EClass.sources.things.rows[0].GetType().GetFields();
98 foreach (System.Reflection.FieldInfo fieldInfo in fields)
100 if (!(fieldInfo.Name ==
"parse"))
102 row3.SetField(fieldInfo.Name, o.GetField(fieldInfo.Name));
106 row3._origin = row2._origin;
111 if (row2.chance != -1)
113 row3.chance = row2.chance;
115 if (row2.value != -1)
117 row3.value = row2.value;
121 row3.value +=
EClass.rnd(row3.value / 2);
123 if (row2.weight != -1)
125 row3.weight = row2.weight;
127 if (!row2.tiles.IsEmpty())
129 row3.tiles = row2.tiles;
131 if (!row2.skins.IsEmpty())
133 row3.skins = row2.skins;
135 if (!row2.name.IsEmpty())
137 row3.name = row2.name;
139 if (!row2.name_JP.IsEmpty())
141 row3.name_JP = row2.name_JP;
143 if (!row2.detail.IsEmpty())
145 row3.detail = row2.detail;
147 if (!row2.detail_JP.IsEmpty())
149 row3.detail_JP = row2.detail_JP;
151 if (!row2.unit.IsEmpty())
153 row3.unit = row2.unit;
155 if (!row2.unit_JP.IsEmpty())
157 row3.unit_JP = row2.unit_JP;
159 if (!row2.vals.IsEmpty())
161 row3.vals = row2.vals;
163 if (!row2.components.IsEmpty())
165 row3.components = row2.components;
167 if (!row2.defMat.IsEmpty())
169 row3.defMat = row2.defMat;
171 if (!row2.trait.IsEmpty())
173 row3.trait = row2.trait;
175 if (!row2.category.IsEmpty())
177 row3.category = row2.category;
179 if (!row2.factory.IsEmpty())
181 row3.factory = row2.factory;
183 if (!row2.tag.IsEmpty())
187 row3.recipeKey = row2.recipeKey;
188 if (!row2.parse.IsEmpty())
190 string origin = row2._origin;
191 if (origin ==
"lamp_ceil2" || origin ==
"window" || origin ==
"windowL")
193 row3.idExtra = row2.parse[0];
197 string[] parse = row2.parse;
198 for (
int i = 0; i < parse.Length; i++)
200 string[] array2 = parse[i].Split(
'/', StringSplitOptions.None);
201 string text = array2[0];
202 uint num = <PrivateImplementationDetails>.ComputeStringHash(text);
203 if (num <= 1260025160U)
205 if (num <= 455432284U)
207 if (num != 235771284U)
209 if (num == 455432284U)
213 row3.altTiles =
new int[]
217 row3.ignoreAltFix =
true;
221 else if (text ==
"sound")
223 row3.idSound = array2[1];
226 else if (num != 1031692888U)
228 if (num != 1035877158U)
230 if (num == 1260025160U)
234 row3.idActorEx = array2[1];
238 else if (text ==
"unique")
243 else if (text ==
"color")
248 else if (num <= 2981401199U)
250 if (num != 1468549011U)
252 if (num != 2121067537U)
254 if (num == 2981401199U)
260 if (array2.Length <= 4)
262 if (array2.Length <= 3)
264 int[] array3 =
new int[2];
265 array3[0] = array2[1].ToInt();
267 array3[1] = array2[2].ToInt();
271 int[] array4 =
new int[3];
272 array4[0] = array2[1].ToInt();
273 array4[1] = array2[2].ToInt();
275 array4[2] = array2[3].ToInt();
280 int[] array5 =
new int[4];
281 array5[0] = array2[1].ToInt();
282 array5[1] = array2[2].ToInt();
283 array5[2] = array2[3].ToInt();
285 array5[3] = array2[4].ToInt();
291 else if (text ==
"naming")
293 row3.naming = array2[1];
296 else if (text ==
"ele")
298 int[] second =
new int[]
300 Core.GetCurrent().sources.elements.alias[array2[1]].id,
303 row3.elements = row3.elements.Concat(second).ToArray<
int>();
306 else if (num != 3822567969U)
308 if (num != 3933629262U)
310 if (num == 4009327117U)
312 if (text ==
"render")
314 row3._idRenderData = array2[1];
318 else if (text ==
"no_color")
323 else if (text ==
"tiletype")
325 row3._tileType = array2[1];
330 this.OnImportRow(row2, row3);
331 row3.OnImportData(
EClass.sources.things);
332 EClass.sources.things.rows.Add(row3);
344 public override string[] ImportFields
361 public override bool UseAlias
371 public override string GetAlias
380 public string[] parse;