Elin Decompiled Documentation EA 23.316 Nightly
Loading...
Searching...
No Matches
SourceFaction.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
4public class SourceFaction : SourceDataString<SourceFaction.Row>
5{
6 [Serializable]
7 public class Row : BaseRow
8 {
9 public string id;
10
11 public string name_JP;
12
13 public string name;
14
15 public string type;
16
17 public string faith;
18
19 public string domain;
20
21 public int relation;
22
23 public string textType_JP;
24
25 public string textType;
26
27 public string textAvatar;
28
29 public string detail_JP;
30
31 public string detail;
32
33 [NonSerialized]
34 public string name_L;
35
36 [NonSerialized]
37 public string detail_L;
38
39 [NonSerialized]
40 public string textType_L;
41
42 [NonSerialized]
43 public string textBenefit_L;
44
45 [NonSerialized]
46 public string textPet_L;
47
48 public override bool UseAlias => false;
49
50 public override string GetAlias => "n";
51 }
52
53 public static readonly IReadOnlyDictionary<string, int> RowMapping = new Dictionary<string, int>
54 {
55 ["id"] = 0,
56 ["name_JP"] = 1,
57 ["name"] = 2,
58 ["type"] = 3,
59 ["faith"] = 4,
60 ["domain"] = 5,
61 ["relation"] = 6,
62 ["textType_JP"] = 7,
63 ["textType"] = 8,
64 ["textAvatar"] = 9,
65 ["detail_JP"] = 10,
66 ["detail"] = 11
67 };
68
69 public static readonly IReadOnlyDictionary<string, string> TypeMapping = new Dictionary<string, string>
70 {
71 ["id"] = "string",
72 ["name_JP"] = "string",
73 ["name"] = "string",
74 ["type"] = "string",
75 ["faith"] = "string",
76 ["domain"] = "string",
77 ["relation"] = "int",
78 ["textType_JP"] = "string",
79 ["textType"] = "string",
80 ["textAvatar"] = "string",
81 ["detail_JP"] = "string",
82 ["detail"] = "string"
83 };
84
85 public override string[] ImportFields => new string[3] { "textType", "textBenefit", "textPet" };
86
87 public override Row CreateRow()
88 {
89 return new Row
90 {
91 id = SourceData.GetString(0),
92 name_JP = SourceData.GetString(1),
93 name = SourceData.GetString(2),
94 type = SourceData.GetString(3),
96 domain = SourceData.GetString(5),
97 relation = SourceData.GetInt(6),
98 textType_JP = SourceData.GetString(7),
99 textType = SourceData.GetString(8),
100 textAvatar = SourceData.GetString(9),
101 detail_JP = SourceData.GetString(10),
102 detail = SourceData.GetString(11)
103 };
104 }
105
106 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
107 {
108 return new Row
109 {
110 id = SourceData.GetString(mapping["id"]),
111 name_JP = SourceData.GetString(mapping["name_JP"]),
112 name = SourceData.GetString(mapping["name"]),
113 type = SourceData.GetString(mapping["type"]),
114 faith = SourceData.GetString(mapping["faith"]),
115 domain = SourceData.GetString(mapping["domain"]),
116 relation = SourceData.GetInt(mapping["relation"]),
117 textType_JP = SourceData.GetString(mapping["textType_JP"]),
118 textType = SourceData.GetString(mapping["textType"]),
119 textAvatar = SourceData.GetString(mapping["textAvatar"]),
120 detail_JP = SourceData.GetString(mapping["detail_JP"]),
121 detail = SourceData.GetString(mapping["detail"])
122 };
123 }
124
125 public override void SetRow(Row r)
126 {
127 map[r.id] = r;
128 }
129
130 public override IReadOnlyDictionary<string, int> GetRowMapping()
131 {
132 return RowMapping;
133 }
134
135 public override IReadOnlyDictionary<string, string> GetTypeMapping()
136 {
137 return TypeMapping;
138 }
139}
static string GetString(int id)
Definition: SourceData.cs:1016
static int GetInt(int id)
Definition: SourceData.cs:981
override bool UseAlias
override string GetAlias
override IReadOnlyDictionary< string, int > GetRowMapping()
override Row CreateRow()
override string[] ImportFields
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
override IReadOnlyDictionary< string, string > GetTypeMapping()
override void SetRow(Row r)
static readonly IReadOnlyDictionary< string, int > RowMapping
static readonly IReadOnlyDictionary< string, string > TypeMapping