Elin Decompiled Documentation EA 23.306 Nightly
Loading...
Searching...
No Matches
SourceCategory Class Reference
Inheritance diagram for SourceCategory:
SourceDataString< SourceCategory.Row >

Classes

class  Row
 

Public Member Functions

override Row CreateRow ()
 
override Row CreateRowByMapping (IReadOnlyDictionary< string, int > mapping)
 
override void SetRow (Row r)
 
override IReadOnlyDictionary< string, int > GetRowMapping ()
 
override void OnInit ()
 
- Public Member Functions inherited from SourceDataString< SourceCategory.Row >
override T GetRow (string id)
 

Static Public Attributes

static readonly IReadOnlyDictionary< string, int > RowMapping
 

Detailed Description

Definition at line 4 of file SourceCategory.cs.

Member Function Documentation

◆ CreateRow()

override Row SourceCategory.CreateRow ( )
inline

Definition at line 167 of file SourceCategory.cs.

168 {
169 return new Row
170 {
171 id = SourceData.GetString(0),
172 uid = SourceData.GetInt(1),
173 name_JP = SourceData.GetString(2),
174 name = SourceData.GetString(3),
175 _parent = SourceData.GetString(4),
176 recipeCat = SourceData.GetString(5),
177 slot = Core.GetElement(SourceData.GetStr(6)),
178 skill = Core.GetElement(SourceData.GetStr(7)),
179 maxStack = SourceData.GetInt(8),
180 tileDummy = SourceData.GetInt(9),
181 installOne = SourceData.GetBool(10),
182 ignoreBless = SourceData.GetInt(11),
183 tag = SourceData.GetStringArray(12),
184 idThing = SourceData.GetString(13),
185 recycle = SourceData.GetStringArray(14),
186 costSP = SourceData.GetInt(15),
187 gift = SourceData.GetInt(16),
188 deliver = SourceData.GetInt(17),
189 offer = SourceData.GetInt(18),
190 ticket = SourceData.GetInt(19),
191 sortVal = SourceData.GetInt(20),
192 flag = SourceData.GetInt(21)
193 };
194 }
@ gift
Definition: Core.cs:14
static int GetElement(string id)
Definition: Core.cs:744
static string[] GetStringArray(int id)
Definition: SourceData.cs:978
static string GetString(int id)
Definition: SourceData.cs:983
static bool GetBool(int id)
Definition: SourceData.cs:953
static int GetInt(int id)
Definition: SourceData.cs:948
static string GetStr(int id, bool useDefault=false)
Definition: SourceData.cs:988

References SourceData< T, T2 >.GetBool(), Core.GetElement(), SourceData< T, T2 >.GetInt(), SourceData< T, T2 >.GetStr(), SourceData< T, T2 >.GetString(), SourceData< T, T2 >.GetStringArray(), and gift.

◆ CreateRowByMapping()

override Row SourceCategory.CreateRowByMapping ( IReadOnlyDictionary< string, int >  mapping)
inline

Definition at line 196 of file SourceCategory.cs.

197 {
198 return new Row
199 {
200 id = SourceData.GetString(mapping["id"]),
201 uid = SourceData.GetInt(mapping["uid"]),
202 name_JP = SourceData.GetString(mapping["name_JP"]),
203 name = SourceData.GetString(mapping["name"]),
204 _parent = SourceData.GetString(mapping["_parent"]),
205 recipeCat = SourceData.GetString(mapping["recipeCat"]),
206 slot = Core.GetElement(SourceData.GetStr(mapping["slot"])),
207 skill = Core.GetElement(SourceData.GetStr(mapping["skill"])),
208 maxStack = SourceData.GetInt(mapping["maxStack"]),
209 tileDummy = SourceData.GetInt(mapping["tileDummy"]),
210 installOne = SourceData.GetBool(mapping["installOne"]),
211 ignoreBless = SourceData.GetInt(mapping["ignoreBless"]),
212 tag = SourceData.GetStringArray(mapping["tag"]),
213 idThing = SourceData.GetString(mapping["idThing"]),
214 recycle = SourceData.GetStringArray(mapping["recycle"]),
215 costSP = SourceData.GetInt(mapping["costSP"]),
216 gift = SourceData.GetInt(mapping["gift"]),
217 deliver = SourceData.GetInt(mapping["deliver"]),
218 offer = SourceData.GetInt(mapping["offer"]),
219 ticket = SourceData.GetInt(mapping["ticket"]),
220 sortVal = SourceData.GetInt(mapping["sortVal"]),
221 flag = SourceData.GetInt(mapping["flag"])
222 };
223 }

References SourceData< T, T2 >.GetBool(), Core.GetElement(), SourceData< T, T2 >.GetInt(), SourceData< T, T2 >.GetStr(), SourceData< T, T2 >.GetString(), SourceData< T, T2 >.GetStringArray(), and gift.

◆ GetRowMapping()

override IReadOnlyDictionary< string, int > SourceCategory.GetRowMapping ( )
inline

Definition at line 230 of file SourceCategory.cs.

231 {
232 return RowMapping;
233 }
static readonly IReadOnlyDictionary< string, int > RowMapping

References RowMapping.

◆ OnInit()

override void SourceCategory.OnInit ( )
inline

Definition at line 235 of file SourceCategory.cs.

236 {
237 foreach (Row row in rows)
238 {
239 row.children = new List<Row>();
240 }
241 foreach (Row row2 in rows)
242 {
243 if (!row2._parent.IsEmpty())
244 {
245 (row2.parent = map[row2._parent]).children.Add(row2);
246 }
247 }
248 }

References SourceCategory.Row._parent.

◆ SetRow()

override void SourceCategory.SetRow ( Row  r)
inline

Definition at line 225 of file SourceCategory.cs.

226 {
227 map[r.id] = r;
228 }

References SourceCategory.Row.id.

Member Data Documentation

◆ RowMapping

readonly IReadOnlyDictionary<string, int> SourceCategory.RowMapping
static
Initial value:
= new Dictionary<string, int>
{
["id"] = 0,
["uid"] = 1,
["name_JP"] = 2,
["name"] = 3,
["_parent"] = 4,
["recipeCat"] = 5,
["slot"] = 6,
["skill"] = 7,
["maxStack"] = 8,
["tileDummy"] = 9,
["installOne"] = 10,
["ignoreBless"] = 11,
["tag"] = 12,
["idThing"] = 13,
["recycle"] = 14,
["costSP"] = 15,
["gift"] = 16,
["deliver"] = 17,
["offer"] = 18,
["ticket"] = 19,
["sortVal"] = 20,
["flag"] = 21
}

Definition at line 141 of file SourceCategory.cs.

Referenced by GetRowMapping().


The documentation for this class was generated from the following file: