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

Classes

class  Row2
 

Public Member Functions

override Row CreateRow ()
 
override void SetRow (Row r)
 
override void Reset ()
 
override void OnImportRow (Row _r, SourceThing.Row c)
 
- Public Member Functions inherited from SourceThingV
override Row CreateRow ()
 
override void SetRow (Row r)
 
override void RestorePref ()
 
override void ValidatePref ()
 
override void Reset ()
 
override void OnAfterImportData ()
 
virtual void OnImportRow (Row _r, SourceThing.Row c)
 
- Public Member Functions inherited from SourceDataString< SourceThingV.Row >
override T GetRow (string id)
 

Additional Inherited Members

- Properties inherited from SourceThingV
override string[] ImportFields [get]
 

Detailed Description

Definition at line 4 of file SourceFood.cs.

Member Function Documentation

◆ CreateRow()

override Row SourceFood.CreateRow ( )
inline

Definition at line 52 of file SourceFood.cs.

53 {
54 return new Row2
55 {
56 id = SourceData.GetString(0),
57 _origin = SourceData.GetString(1),
58 name_JP = SourceData.GetString(2),
59 unit_JP = SourceData.GetString(3),
60 name = SourceData.GetString(4),
61 unit = SourceData.GetString(5),
62 name2_JP = SourceData.GetStringArray(6),
63 name2 = SourceData.GetStringArray(7),
64 tiles = SourceData.GetIntArray(8),
65 parse = SourceData.GetStringArray(9),
66 vals = SourceData.GetStringArray(10),
67 trait = SourceData.GetStringArray(11),
68 elements = Core.ParseElements(SourceData.GetStr(12)),
69 idTaste = SourceData.GetString(14),
70 TST = SourceData.GetInt(15),
71 NUT = SourceData.GetInt(16),
72 STR = SourceData.GetInt(17),
73 STR2 = SourceData.GetInt(18),
74 END = SourceData.GetInt(19),
75 END2 = SourceData.GetInt(20),
76 DEX = SourceData.GetInt(21),
77 DEX2 = SourceData.GetInt(22),
78 PER = SourceData.GetInt(23),
79 PER2 = SourceData.GetInt(24),
80 LER = SourceData.GetInt(25),
81 LER2 = SourceData.GetInt(26),
82 WIL = SourceData.GetInt(27),
83 WIL2 = SourceData.GetInt(28),
84 MAG = SourceData.GetInt(29),
85 MAG2 = SourceData.GetInt(30),
86 CHA = SourceData.GetInt(31),
87 CHA2 = SourceData.GetInt(32),
88 LV = SourceData.GetInt(34),
89 chance = SourceData.GetInt(35),
90 value = SourceData.GetInt(36),
91 weight = SourceData.GetInt(37),
92 recipeKey = SourceData.GetStringArray(38),
93 factory = SourceData.GetStringArray(39),
94 components = SourceData.GetStringArray(40),
95 defMat = SourceData.GetString(41),
96 category = SourceData.GetString(42),
97 tag = SourceData.GetStringArray(43),
98 detail_JP = SourceData.GetString(44),
99 detail = SourceData.GetString(45)
100 };
101 }
Definition: Core.cs:14
static int[] ParseElements(string str)
Definition: Core.cs:714
static string[] GetStringArray(int id)
Definition: SourceData.cs:741
static string GetString(int id)
Definition: SourceData.cs:746
static int GetInt(int id)
Definition: SourceData.cs:711
static string GetStr(int id, bool useDefault=false)
Definition: SourceData.cs:751
static int[] GetIntArray(int id)
Definition: SourceData.cs:736

References SourceData< T, T2 >.GetInt(), SourceData< T, T2 >.GetIntArray(), SourceData< T, T2 >.GetStr(), SourceData< T, T2 >.GetString(), SourceData< T, T2 >.GetStringArray(), and Core.ParseElements().

◆ OnImportRow()

override void SourceFood.OnImportRow ( Row  _r,
SourceThing::Row  c 
)
inlinevirtual

Reimplemented from SourceThingV.

Definition at line 114 of file SourceFood.cs.

115 {
116 List<int> list = new List<int>(c.elements);
117 Row2 row = _r as Row2;
118 Add(10, row.NUT);
119 Parse(row.STR, 70, row.STR2, 440);
120 Parse(row.END, 71, row.END2, 441);
121 Parse(row.DEX, 72, row.DEX2, 442);
122 Parse(row.PER, 73, row.PER2, 443);
123 Parse(row.LER, 74, row.LER2, 444);
124 Parse(row.WIL, 75, row.WIL2, 445);
125 Parse(row.MAG, 76, row.MAG2, 446);
126 Parse(row.CHA, 77, row.CHA2, 447);
127 for (int i = 0; i < row.elements.Length; i += 2)
128 {
129 Add(_r.elements[i], row.elements[i + 1]);
130 }
131 c.elements = list.ToArray();
132 c.name2 = row.name2;
133 c.name2_JP = row.name2_JP;
134 if (!row.unit_JP.IsEmpty())
135 {
136 c.unit_JP = row.unit_JP;
137 }
138 void Add(int ele, int a)
139 {
140 list.Add(ele);
141 list.Add(a);
142 }
143 void Parse(int raw, int ele, int raw2, int ele2)
144 {
145 if (raw != 0)
146 {
147 Add(ele, raw);
148 }
149 if (raw2 != 0)
150 {
151 Add(ele2, raw2);
152 }
153 }
154 }
list. Add(item3)
int[] elements
Definition: CardRow.cs:21

References Add(), SourceFood.Row2.CHA, SourceFood.Row2.CHA2, SourceFood.Row2.DEX, SourceFood.Row2.DEX2, CardRow.elements, SourceFood.Row2.END, SourceFood.Row2.END2, SourceFood.Row2.LER, SourceFood.Row2.LER2, SourceFood.Row2.MAG, SourceFood.Row2.MAG2, CardRow.name2, CardRow.name2_JP, SourceFood.Row2.NUT, SourceFood.Row2.PER, SourceFood.Row2.PER2, SourceFood.Row2.STR, SourceFood.Row2.STR2, SourceThing.Row.unit_JP, SourceFood.Row2.WIL, and SourceFood.Row2.WIL2.

◆ Reset()

override void SourceFood.Reset ( )
inline

Definition at line 108 of file SourceFood.cs.

109 {
110 base.Reset();
111 EClass.sources.things.Reset();
112 }
Definition: EClass.cs:5
static SourceManager sources
Definition: EClass.cs:42
SourceThing things

References EClass.sources, and SourceManager.things.

◆ SetRow()

override void SourceFood.SetRow ( Row  r)
inline

Definition at line 103 of file SourceFood.cs.

104 {
105 map[r.id] = r;
106 }

References CardRow.id.


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