Elin Decompiled Documentation EA 23.321 Nightly Patch 1
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 IReadOnlyDictionary< string, string > GetTypeMapping ()
 
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
 
static readonly IReadOnlyDictionary< string, string > TypeMapping
 

Detailed Description

Definition at line 4 of file SourceCategory.cs.

Member Function Documentation

◆ CreateRow()

override Row SourceCategory.CreateRow ( )
inline

Definition at line 193 of file SourceCategory.cs.

194 {
195 return new Row
196 {
197 id = SourceData.GetString(0),
198 uid = SourceData.GetInt(1),
199 name_JP = SourceData.GetString(2),
200 name = SourceData.GetString(3),
201 _parent = SourceData.GetString(4),
202 recipeCat = SourceData.GetString(5),
203 slot = Core.GetElement(SourceData.GetStr(6)),
204 skill = Core.GetElement(SourceData.GetStr(7)),
205 maxStack = SourceData.GetInt(8),
206 tileDummy = SourceData.GetInt(9),
207 installOne = SourceData.GetBool(10),
208 ignoreBless = SourceData.GetInt(11),
209 tag = SourceData.GetStringArray(12),
210 idThing = SourceData.GetString(13),
211 recycle = SourceData.GetStringArray(14),
212 costSP = SourceData.GetInt(15),
213 gift = SourceData.GetInt(16),
214 deliver = SourceData.GetInt(17),
215 offer = SourceData.GetInt(18),
216 ticket = SourceData.GetInt(19),
217 sortVal = SourceData.GetInt(20),
218 flag = SourceData.GetInt(21)
219 };
220 }
@ gift
Definition: Core.cs:14
static int GetElement(string id)
Definition: Core.cs:743
static string[] GetStringArray(int id)
Definition: SourceData.cs:1011
static string GetString(int id)
Definition: SourceData.cs:1016
static bool GetBool(int id)
Definition: SourceData.cs:986
static int GetInt(int id)
Definition: SourceData.cs:981
static string GetStr(int id, bool useDefault=false)
Definition: SourceData.cs:1021

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 222 of file SourceCategory.cs.

223 {
224 return new Row
225 {
226 id = SourceData.GetString(mapping["id"]),
227 uid = SourceData.GetInt(mapping["uid"]),
228 name_JP = SourceData.GetString(mapping["name_JP"]),
229 name = SourceData.GetString(mapping["name"]),
230 _parent = SourceData.GetString(mapping["_parent"]),
231 recipeCat = SourceData.GetString(mapping["recipeCat"]),
232 slot = Core.GetElement(SourceData.GetStr(mapping["slot"])),
233 skill = Core.GetElement(SourceData.GetStr(mapping["skill"])),
234 maxStack = SourceData.GetInt(mapping["maxStack"]),
235 tileDummy = SourceData.GetInt(mapping["tileDummy"]),
236 installOne = SourceData.GetBool(mapping["installOne"]),
237 ignoreBless = SourceData.GetInt(mapping["ignoreBless"]),
238 tag = SourceData.GetStringArray(mapping["tag"]),
239 idThing = SourceData.GetString(mapping["idThing"]),
240 recycle = SourceData.GetStringArray(mapping["recycle"]),
241 costSP = SourceData.GetInt(mapping["costSP"]),
242 gift = SourceData.GetInt(mapping["gift"]),
243 deliver = SourceData.GetInt(mapping["deliver"]),
244 offer = SourceData.GetInt(mapping["offer"]),
245 ticket = SourceData.GetInt(mapping["ticket"]),
246 sortVal = SourceData.GetInt(mapping["sortVal"]),
247 flag = SourceData.GetInt(mapping["flag"])
248 };
249 }

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 256 of file SourceCategory.cs.

257 {
258 return RowMapping;
259 }
static readonly IReadOnlyDictionary< string, int > RowMapping

References RowMapping.

◆ GetTypeMapping()

override IReadOnlyDictionary< string, string > SourceCategory.GetTypeMapping ( )
inline

Definition at line 261 of file SourceCategory.cs.

262 {
263 return TypeMapping;
264 }
static readonly IReadOnlyDictionary< string, string > TypeMapping

References TypeMapping.

◆ OnInit()

override void SourceCategory.OnInit ( )
inline

Definition at line 266 of file SourceCategory.cs.

267 {
268 foreach (Row row in rows)
269 {
270 row.children = new List<Row>();
271 }
272 foreach (Row row2 in rows)
273 {
274 if (!row2._parent.IsEmpty())
275 {
276 (row2.parent = map[row2._parent]).children.Add(row2);
277 }
278 }
279 }

References SourceCategory.Row._parent.

◆ SetRow()

override void SourceCategory.SetRow ( Row  r)
inline

Definition at line 251 of file SourceCategory.cs.

252 {
253 map[r.id] = r;
254 }

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().

◆ TypeMapping

readonly IReadOnlyDictionary<string, string> SourceCategory.TypeMapping
static
Initial value:
= new Dictionary<string, string>
{
["id"] = "string",
["uid"] = "int",
["name_JP"] = "string",
["name"] = "string",
["_parent"] = "string",
["recipeCat"] = "string",
["slot"] = "element_id",
["skill"] = "element_id",
["maxStack"] = "int",
["tileDummy"] = "int",
["installOne"] = "bool",
["ignoreBless"] = "int",
["tag"] = "string[]",
["idThing"] = "string",
["recycle"] = "string[]",
["costSP"] = "int",
["gift"] = "int",
["deliver"] = "int",
["offer"] = "int",
["ticket"] = "int",
["sortVal"] = "int",
["flag"] = "int"
}

Definition at line 167 of file SourceCategory.cs.

Referenced by GetTypeMapping().


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