2using System.Collections.Generic;
4using System.Reflection;
18 public static readonly IReadOnlyDictionary<string, int>
RowMapping =
new Dictionary<string, int>
45 public static readonly IReadOnlyDictionary<string, string>
TypeMapping =
new Dictionary<string, string>
48 [
"_origin"] =
"string",
49 [
"name_JP"] =
"string",
50 [
"unit_JP"] =
"string",
55 [
"parse"] =
"string[]",
56 [
"vals"] =
"string[]",
57 [
"trait"] =
"string[]",
62 [
"recipeKey"] =
"string[]",
63 [
"factory"] =
"string[]",
64 [
"components"] =
"string[]",
65 [
"defMat"] =
"string",
66 [
"category"] =
"string",
68 [
"detail_JP"] =
"string",
163 dictionary[row3.id] = row3;
167 if (!row4.pref.UsePref && !row4._origin.IsEmpty())
170 row4.pref = IO.DeepCopy(row.
pref);
171 row4.pref.flags |=
PrefFlag.UsePref;
195 dictionary[row2.id] = row2;
198 foreach (
Row row3
in rows)
203 foreach (KeyValuePair<string, System.Reflection.FieldInfo>
item in rowFields)
205 item.Deconstruct(out key, out var value);
207 System.Reflection.FieldInfo fieldInfo = value;
208 if (!(text ==
"parse"))
210 fieldInfo.SetValue(row, fieldInfo.GetValue(obj));
223 if (row3.
value != -1)
225 row.value = row3.
value;
235 if (!row3.
tiles.IsEmpty())
237 row.tiles = row3.
tiles;
239 if (!row3.
skins.IsEmpty())
241 row.skins = row3.
skins;
243 if (!row3.
name.IsEmpty())
245 row.name = row3.
name;
251 if (!row3.
detail.IsEmpty())
259 if (!row3.
unit.IsEmpty())
261 row.unit = row3.
unit;
267 if (!row3.
vals.IsEmpty())
269 row.vals = row3.
vals;
275 if (!row3.
defMat.IsEmpty())
279 if (!row3.
trait.IsEmpty())
281 row.trait = row3.
trait;
291 if (!row3.
tag.IsEmpty())
296 if (!row3.
parse.IsEmpty())
304 row.idExtra = row3.
parse[0];
308 string[] parse = row3.
parse;
309 for (
int i = 0; i < parse.Length; i++)
311 string[] array = parse[i].Split(
'/');
315 row.electricity = array[1].ToInt();
318 row._idRenderData = array[1];
321 row._tileType = array[1];
324 row.anime = ((array.Length <= 4) ? ((array.Length <= 3) ?
new int[2]
343 string[] array3 = array[1].Split(
'|');
344 row.skins =
new int[array3.Length];
345 for (
int k = 0; k < array3.Length; k++)
347 row.skins[k] = array3[k].ToInt();
353 string[] array2 = array[1].Split(
'|');
354 row.altTiles =
new int[array2.Length];
355 for (
int j = 0; j < array2.Length; j++)
357 row.altTiles[j] = array2[j].ToInt();
359 row.ignoreAltFix =
true;
363 row.naming = array[1];
366 row.idActorEx = array[1];
369 row.idSound = array[1];
382 int[] second =
new int[2]
387 row.elements = row.elements.Concat(second).ToArray();
static SourceManager sources
Dictionary< string, FieldInfo > GetRowFields()
static string[] GetStringArray(int id)
static string GetString(int id)
static int GetInt(int id)
static int[] GetIntArray(int id)
override IReadOnlyDictionary< string, string > GetTypeMapping()
override IReadOnlyDictionary< string, int > GetRowMapping()
static readonly IReadOnlyDictionary< string, string > TypeMapping
override string[] ImportFields
override void RestorePref()
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
override void OnAfterImportData()
static readonly IReadOnlyDictionary< string, int > RowMapping
virtual void OnImportRow(Row _r, SourceThing.Row c)
override void SetRow(Row r)
override void ValidatePref()
Dictionary< string, Row > _rows
bool ContainsKey(TKey key)