Elin Decompiled Documentation EA 23.319 Nightly Patch 1
Loading...
Searching...
No Matches
SourceHobby Class Reference
Inheritance diagram for SourceHobby:
SourceDataInt< SourceHobby.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 SourceDataInt< SourceHobby.Row >
override T GetRow (string id)
 

Public Attributes

List< RowlistHobbies = new List<Row>()
 
List< RowlistWorks = new List<Row>()
 

Static Public Attributes

static readonly IReadOnlyDictionary< string, int > RowMapping
 
static readonly IReadOnlyDictionary< string, string > TypeMapping
 

Detailed Description

Definition at line 4 of file SourceHobby.cs.

Member Function Documentation

◆ CreateRow()

override Row SourceHobby.CreateRow ( )
inline

Definition at line 114 of file SourceHobby.cs.

115 {
116 return new Row
117 {
118 id = SourceData.GetInt(0),
119 alias = SourceData.GetString(1),
120 type = SourceData.GetString(2),
121 name_JP = SourceData.GetString(3),
122 name = SourceData.GetString(4),
123 ai = SourceData.GetString(5),
124 talk = SourceData.GetString(6),
125 area = SourceData.GetString(7),
126 destTrait = SourceData.GetString(8),
127 workTag = SourceData.GetString(9),
128 expedition = SourceData.GetString(10),
129 resources = SourceData.GetIntArray(11),
130 randomRange = SourceData.GetInt(12),
131 modifiers = SourceData.GetStringArray(13),
132 tax = SourceData.GetInt(14),
133 things = SourceData.GetStringArray(15),
134 elements = Core.ParseElements(SourceData.GetStr(16)),
135 skill = SourceData.GetString(17),
136 detail_JP = SourceData.GetString(18),
137 detail = SourceData.GetString(19)
138 };
139 }
Definition: Core.cs:14
static int[] ParseElements(string str)
Definition: Core.cs:726
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 string GetStr(int id, bool useDefault=false)
Definition: SourceData.cs:1021
static int[] GetIntArray(int id)
Definition: SourceData.cs:1006

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

◆ CreateRowByMapping()

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

Definition at line 141 of file SourceHobby.cs.

142 {
143 return new Row
144 {
145 id = SourceData.GetInt(mapping["id"]),
146 alias = SourceData.GetString(mapping["alias"]),
147 type = SourceData.GetString(mapping["type"]),
148 name_JP = SourceData.GetString(mapping["name_JP"]),
149 name = SourceData.GetString(mapping["name"]),
150 ai = SourceData.GetString(mapping["ai"]),
151 talk = SourceData.GetString(mapping["talk"]),
152 area = SourceData.GetString(mapping["area"]),
153 destTrait = SourceData.GetString(mapping["destTrait"]),
154 workTag = SourceData.GetString(mapping["workTag"]),
155 expedition = SourceData.GetString(mapping["expedition"]),
156 resources = SourceData.GetIntArray(mapping["resources"]),
157 randomRange = SourceData.GetInt(mapping["randomRange"]),
158 modifiers = SourceData.GetStringArray(mapping["modifiers"]),
159 tax = SourceData.GetInt(mapping["tax"]),
160 things = SourceData.GetStringArray(mapping["things"]),
161 elements = Core.ParseElements(SourceData.GetStr(mapping["elements"])),
162 skill = SourceData.GetString(mapping["skill"]),
163 detail_JP = SourceData.GetString(mapping["detail_JP"]),
164 detail = SourceData.GetString(mapping["detail"])
165 };
166 }

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

◆ GetRowMapping()

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

Definition at line 173 of file SourceHobby.cs.

174 {
175 return RowMapping;
176 }
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: SourceHobby.cs:60

References RowMapping.

◆ GetTypeMapping()

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

Definition at line 178 of file SourceHobby.cs.

179 {
180 return TypeMapping;
181 }
static readonly IReadOnlyDictionary< string, string > TypeMapping
Definition: SourceHobby.cs:84

References TypeMapping.

◆ OnInit()

override void SourceHobby.OnInit ( )
inline

Definition at line 183 of file SourceHobby.cs.

184 {
185 foreach (Row row in rows)
186 {
187 switch (row.type)
188 {
189 case "Hobby":
190 listHobbies.Add(row);
191 break;
192 case "Work":
193 listWorks.Add(row);
194 break;
195 case "Both":
196 listHobbies.Add(row);
197 listWorks.Add(row);
198 break;
199 }
200 }
201 }
List< Row > listWorks
Definition: SourceHobby.cs:112
List< Row > listHobbies
Definition: SourceHobby.cs:109

References listHobbies, listWorks, and SourceHobby.Row.type.

◆ SetRow()

override void SourceHobby.SetRow ( Row  r)
inline

Definition at line 168 of file SourceHobby.cs.

169 {
170 map[r.id] = r;
171 }

References SourceHobby.Row.id.

Member Data Documentation

◆ listHobbies

List<Row> SourceHobby.listHobbies = new List<Row>()

Definition at line 109 of file SourceHobby.cs.

Referenced by OnInit(), and Chara.RerollHobby().

◆ listWorks

List<Row> SourceHobby.listWorks = new List<Row>()

Definition at line 112 of file SourceHobby.cs.

Referenced by OnInit(), and Chara.RerollHobby().

◆ RowMapping

readonly IReadOnlyDictionary<string, int> SourceHobby.RowMapping
static
Initial value:
= new Dictionary<string, int>
{
["id"] = 0,
["alias"] = 1,
["type"] = 2,
["name_JP"] = 3,
["name"] = 4,
["ai"] = 5,
["talk"] = 6,
["area"] = 7,
["destTrait"] = 8,
["workTag"] = 9,
["expedition"] = 10,
["resources"] = 11,
["randomRange"] = 12,
["modifiers"] = 13,
["tax"] = 14,
["things"] = 15,
["elements"] = 16,
["skill"] = 17,
["detail_JP"] = 18,
["detail"] = 19
}

Definition at line 60 of file SourceHobby.cs.

Referenced by GetRowMapping().

◆ TypeMapping

readonly IReadOnlyDictionary<string, string> SourceHobby.TypeMapping
static
Initial value:
= new Dictionary<string, string>
{
["id"] = "int",
["alias"] = "string",
["type"] = "string",
["name_JP"] = "string",
["name"] = "string",
["ai"] = "string",
["talk"] = "string",
["area"] = "string",
["destTrait"] = "string",
["workTag"] = "string",
["expedition"] = "string",
["resources"] = "int[]",
["randomRange"] = "int",
["modifiers"] = "string[]",
["tax"] = "int",
["things"] = "string[]",
["elements"] = "elements",
["skill"] = "string",
["detail_JP"] = "string",
["detail"] = "string"
}

Definition at line 84 of file SourceHobby.cs.

Referenced by GetTypeMapping().


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