Elin Decompiled Documentation EA 23.306 Nightly
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 override string[] ImportFields => new string[1] { "textFlavor" };
100
101 public override Row CreateRow()
102 {
103 return new Row
104 {
105 id = SourceData.GetString(0),
106 parent = SourceData.GetString(1),
107 name_JP = SourceData.GetString(2),
108 name = SourceData.GetString(3),
109 type = SourceData.GetString(4),
110 LV = SourceData.GetInt(5),
111 chance = SourceData.GetInt(6),
112 faction = SourceData.GetString(7),
113 value = SourceData.GetInt(8),
114 idProfile = SourceData.GetString(9),
115 idFile = SourceData.GetStringArray(10),
116 idBiome = SourceData.GetString(11),
117 idGen = SourceData.GetString(12),
118 idPlaylist = SourceData.GetString(13),
119 tag = SourceData.GetStringArray(14),
120 cost = SourceData.GetInt(15),
121 dev = SourceData.GetInt(16),
122 image = SourceData.GetString(17),
123 pos = SourceData.GetIntArray(18),
124 questTag = SourceData.GetStringArray(19),
125 textFlavor_JP = SourceData.GetString(20),
126 textFlavor = SourceData.GetString(21),
127 detail_JP = SourceData.GetString(22),
128 detail = SourceData.GetString(23)
129 };
130 }
131
132 public override Row CreateRowByMapping(IReadOnlyDictionary<string, int> mapping)
133 {
134 return new Row
135 {
136 id = SourceData.GetString(mapping["id"]),
137 parent = SourceData.GetString(mapping["parent"]),
138 name_JP = SourceData.GetString(mapping["name_JP"]),
139 name = SourceData.GetString(mapping["name"]),
140 type = SourceData.GetString(mapping["type"]),
141 LV = SourceData.GetInt(mapping["LV"]),
142 chance = SourceData.GetInt(mapping["chance"]),
143 faction = SourceData.GetString(mapping["faction"]),
144 value = SourceData.GetInt(mapping["value"]),
145 idProfile = SourceData.GetString(mapping["idProfile"]),
146 idFile = SourceData.GetStringArray(mapping["idFile"]),
147 idBiome = SourceData.GetString(mapping["idBiome"]),
148 idGen = SourceData.GetString(mapping["idGen"]),
149 idPlaylist = SourceData.GetString(mapping["idPlaylist"]),
150 tag = SourceData.GetStringArray(mapping["tag"]),
151 cost = SourceData.GetInt(mapping["cost"]),
152 dev = SourceData.GetInt(mapping["dev"]),
153 image = SourceData.GetString(mapping["image"]),
154 pos = SourceData.GetIntArray(mapping["pos"]),
155 questTag = SourceData.GetStringArray(mapping["questTag"]),
156 textFlavor_JP = SourceData.GetString(mapping["textFlavor_JP"]),
157 textFlavor = SourceData.GetString(mapping["textFlavor"]),
158 detail_JP = SourceData.GetString(mapping["detail_JP"]),
159 detail = SourceData.GetString(mapping["detail"])
160 };
161 }
162
163 public override void SetRow(Row r)
164 {
165 map[r.id] = r;
166 }
167
168 public override IReadOnlyDictionary<string, int> GetRowMapping()
169 {
170 return RowMapping;
171 }
172}
static string[] GetStringArray(int id)
Definition: SourceData.cs:978
static string GetString(int id)
Definition: SourceData.cs:983
static int GetInt(int id)
Definition: SourceData.cs:948
static int[] GetIntArray(int id)
Definition: SourceData.cs:973
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:99
override void SetRow(Row r)
Definition: SourceZone.cs:163
override Row CreateRow()
Definition: SourceZone.cs:101
override IReadOnlyDictionary< string, int > GetRowMapping()
Definition: SourceZone.cs:168
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
Definition: SourceZone.cs:132