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