Elin Decompiled Documentation EA 23.321 Nightly Patch 1
Loading...
Searching...
No Matches
SourceZone.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
4public class SourceZone : SourceDataString<SourceZone.Row>
5{
6 [Serializable]
7 public class Row : BaseRow
8 {
9 public string id;
10
11 public string parent;
12
13 public string name_JP;
14
15 public string name;
16
17 public string type;
18
19 public int LV;
20
21 public int chance;
22
23 public string faction;
24
25 public int value;
26
27 public string idProfile;
28
29 public string[] idFile;
30
31 public string idBiome;
32
33 public string idGen;
34
35 public string idPlaylist;
36
37 public string[] tag;
38
39 public int cost;
40
41 public int dev;
42
43 public string image;
44
45 public int[] pos;
46
47 public string[] questTag;
48
49 public string textFlavor_JP;
50
51 public string textFlavor;
52
53 public string detail_JP;
54
55 public string detail;
56
57 [NonSerialized]
58 public string name_L;
59
60 [NonSerialized]
61 public string detail_L;
62
63 [NonSerialized]
64 public string textFlavor_L;
65
66 public override bool UseAlias => false;
67
68 public override string GetAlias => "n";
69 }
70
71 public static readonly IReadOnlyDictionary<string, int> RowMapping = new Dictionary<string, int>
72 {
73 ["id"] = 0,
74 ["parent"] = 1,
75 ["name_JP"] = 2,
76 ["name"] = 3,
77 ["type"] = 4,
78 ["LV"] = 5,
79 ["chance"] = 6,
80 ["faction"] = 7,
81 ["value"] = 8,
82 ["idProfile"] = 9,
83 ["idFile"] = 10,
84 ["idBiome"] = 11,
85 ["idGen"] = 12,
86 ["idPlaylist"] = 13,
87 ["tag"] = 14,
88 ["cost"] = 15,
89 ["dev"] = 16,
90 ["image"] = 17,
91 ["pos"] = 18,
92 ["questTag"] = 19,
93 ["textFlavor_JP"] = 20,
94 ["textFlavor"] = 21,
95 ["detail_JP"] = 22,
96 ["detail"] = 23
97 };
98
99 public static readonly IReadOnlyDictionary<string, string> TypeMapping = new Dictionary<string, string>
100 {
101 ["id"] = "string",
102 ["parent"] = "string",
103 ["name_JP"] = "string",
104 ["name"] = "string",
105 ["type"] = "string",
106 ["LV"] = "int",
107 ["chance"] = "int",
108 ["faction"] = "string",
109 ["value"] = "int",
110 ["idProfile"] = "string",
111 ["idFile"] = "string[]",
112 ["idBiome"] = "string",
113 ["idGen"] = "string",
114 ["idPlaylist"] = "string",
115 ["tag"] = "string[]",
116 ["cost"] = "int",
117 ["dev"] = "int",
118 ["image"] = "string",
119 ["pos"] = "int[]",
120 ["questTag"] = "string[]",
121 ["textFlavor_JP"] = "string",
122 ["textFlavor"] = "string",
123 ["detail_JP"] = "string",
124 ["detail"] = "string"
125 };
126
127 public override string[] ImportFields => new string[1] { "textFlavor" };
128
129 public override Row CreateRow()
130 {
131 return new Row
132 {
133 id = SourceData.GetString(0),
134 parent = SourceData.GetString(1),
135 name_JP = SourceData.GetString(2),
136 name = SourceData.GetString(3),
137 type = SourceData.GetString(4),
138 LV = SourceData.GetInt(5),
139 chance = SourceData.GetInt(6),
140 faction = SourceData.GetString(7),
141 value = SourceData.GetInt(8),
142 idProfile = SourceData.GetString(9),
143 idFile = SourceData.GetStringArray(10),
144 idBiome = SourceData.GetString(11),
145 idGen = SourceData.GetString(12),
146 idPlaylist = SourceData.GetString(13),
147 tag = SourceData.GetStringArray(14),
148 cost = SourceData.GetInt(15),
149 dev = SourceData.GetInt(16),
150 image = SourceData.GetString(17),
151 pos = SourceData.GetIntArray(18),
152 questTag = SourceData.GetStringArray(19),
153 textFlavor_JP = SourceData.GetString(20),
154 textFlavor = SourceData.GetString(21),
155 detail_JP = SourceData.GetString(22),
156 detail = SourceData.GetString(23)
157 };
158 }
159
160 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
161 {
162 return new Row
163 {
164 id = SourceData.GetString(mapping["id"]),
165 parent = SourceData.GetString(mapping["parent"]),
166 name_JP = SourceData.GetString(mapping["name_JP"]),
167 name = SourceData.GetString(mapping["name"]),
168 type = SourceData.GetString(mapping["type"]),
169 LV = SourceData.GetInt(mapping["LV"]),
170 chance = SourceData.GetInt(mapping["chance"]),
171 faction = SourceData.GetString(mapping["faction"]),
172 value = SourceData.GetInt(mapping["value"]),
173 idProfile = SourceData.GetString(mapping["idProfile"]),
174 idFile = SourceData.GetStringArray(mapping["idFile"]),
175 idBiome = SourceData.GetString(mapping["idBiome"]),
176 idGen = SourceData.GetString(mapping["idGen"]),
177 idPlaylist = SourceData.GetString(mapping["idPlaylist"]),
178 tag = SourceData.GetStringArray(mapping["tag"]),
179 cost = SourceData.GetInt(mapping["cost"]),
180 dev = SourceData.GetInt(mapping["dev"]),
181 image = SourceData.GetString(mapping["image"]),
182 pos = SourceData.GetIntArray(mapping["pos"]),
183 questTag = SourceData.GetStringArray(mapping["questTag"]),
184 textFlavor_JP = SourceData.GetString(mapping["textFlavor_JP"]),
185 textFlavor = SourceData.GetString(mapping["textFlavor"]),
186 detail_JP = SourceData.GetString(mapping["detail_JP"]),
187 detail = SourceData.GetString(mapping["detail"])
188 };
189 }
190
191 public override void SetRow(Row r)
192 {
193 map[r.id] = r;
194 }
195
196 public override IReadOnlyDictionary<string, int> GetRowMapping()
197 {
198 return RowMapping;
199 }
200
201 public override IReadOnlyDictionary<string, string> GetTypeMapping()
202 {
203 return TypeMapping;
204 }
205}
static string[] GetStringArray(int id)
Definition: SourceData.cs:1011
static string GetString(int id)
Definition: SourceData.cs:1016
static int GetInt(int id)
Definition: SourceData.cs:981
static int[] GetIntArray(int id)
Definition: SourceData.cs:1006
string detail
Definition: SourceZone.cs:55
string textFlavor
Definition: SourceZone.cs:51
string detail_L
Definition: SourceZone.cs:61
override string GetAlias
Definition: SourceZone.cs:68
string textFlavor_L
Definition: SourceZone.cs:64
string[] tag
Definition: SourceZone.cs:37
string idGen
Definition: SourceZone.cs:33
string detail_JP
Definition: SourceZone.cs:53
string name_L
Definition: SourceZone.cs:58
string parent
Definition: SourceZone.cs:11
string idBiome
Definition: SourceZone.cs:31
string[] idFile
Definition: SourceZone.cs:29
string image
Definition: SourceZone.cs:43
string[] questTag
Definition: SourceZone.cs:47
override bool UseAlias
Definition: SourceZone.cs:66
string idProfile
Definition: SourceZone.cs:27
string textFlavor_JP
Definition: SourceZone.cs:49
string idPlaylist
Definition: SourceZone.cs:35
string faction
Definition: SourceZone.cs:23
string name_JP
Definition: SourceZone.cs:13
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: SourceZone.cs:71
override string[] ImportFields
Definition: SourceZone.cs:127
static readonly IReadOnlyDictionary< string, string > TypeMapping
Definition: SourceZone.cs:99
override void SetRow(Row r)
Definition: SourceZone.cs:191
override IReadOnlyDictionary< string, string > GetTypeMapping()
Definition: SourceZone.cs:201
override Row CreateRow()
Definition: SourceZone.cs:129
override IReadOnlyDictionary< string, int > GetRowMapping()
Definition: SourceZone.cs:196
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
Definition: SourceZone.cs:160