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

Public Attributes

List< RowlistRemain = new List<Row>()
 
List< RowlistLantern = new List<Row>()
 
List< RowlistTree = new List<Row>()
 
List< RowlistPet = new List<Row>()
 
List< RowlistSister = new List<Row>()
 
List< RowlistFollower = new List<Row>()
 
List< RowlistSnail = 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 SourceBacker.cs.

Member Function Documentation

◆ CreateRow()

override Row SourceBacker.CreateRow ( )
inline

Definition at line 127 of file SourceBacker.cs.

128 {
129 return new Row
130 {
131 id = SourceData.GetInt(0),
132 valid = SourceData.GetBool(3),
133 lang = SourceData.GetString(7),
134 name = SourceData.GetString(8),
135 text = SourceData.GetString(9),
136 type = SourceData.GetInt(10),
137 skin = SourceData.GetInt(11),
138 gender = SourceData.GetInt(12),
139 tree = SourceData.GetString(13),
140 deity = SourceData.GetString(14),
141 chara = SourceData.GetString(15),
142 loot = SourceData.GetString(16),
143 isStatic = SourceData.GetInt(17),
144 done = SourceData.GetBool(18),
145 loc = SourceData.GetString(19),
146 original = SourceData.GetString(20)
147 };
148 }
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

References SourceData< T, T2 >.GetBool(), SourceData< T, T2 >.GetInt(), and SourceData< T, T2 >.GetString().

◆ CreateRowByMapping()

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

Definition at line 150 of file SourceBacker.cs.

151 {
152 return new Row
153 {
154 id = SourceData.GetInt(mapping["id"]),
155 valid = SourceData.GetBool(mapping["valid"]),
156 lang = SourceData.GetString(mapping["lang"]),
157 name = SourceData.GetString(mapping["name"]),
158 text = SourceData.GetString(mapping["text"]),
159 type = SourceData.GetInt(mapping["type"]),
160 skin = SourceData.GetInt(mapping["skin"]),
161 gender = SourceData.GetInt(mapping["gender"]),
162 tree = SourceData.GetString(mapping["tree"]),
163 deity = SourceData.GetString(mapping["deity"]),
164 chara = SourceData.GetString(mapping["chara"]),
165 loot = SourceData.GetString(mapping["loot"]),
166 isStatic = SourceData.GetInt(mapping["isStatic"]),
167 done = SourceData.GetBool(mapping["done"]),
168 loc = SourceData.GetString(mapping["loc"]),
169 original = SourceData.GetString(mapping["original"])
170 };
171 }

References SourceData< T, T2 >.GetBool(), SourceData< T, T2 >.GetInt(), and SourceData< T, T2 >.GetString().

◆ GetRowMapping()

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

Definition at line 178 of file SourceBacker.cs.

179 {
180 return RowMapping;
181 }
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: SourceBacker.cs:66

References RowMapping.

◆ GetTypeMapping()

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

Definition at line 183 of file SourceBacker.cs.

184 {
185 return TypeMapping;
186 }
static readonly IReadOnlyDictionary< string, string > TypeMapping
Definition: SourceBacker.cs:86

References TypeMapping.

◆ OnInit()

override void SourceBacker.OnInit ( )
inline

Definition at line 188 of file SourceBacker.cs.

189 {
190 foreach (Row row in rows)
191 {
192 if (row.isStatic == 0 && row.valid)
193 {
194 switch (row.type)
195 {
196 case 1:
197 listRemain.Add(row);
198 break;
199 case 2:
200 listLantern.Add(row);
201 break;
202 case 3:
203 listTree.Add(row);
204 break;
205 case 4:
206 listPet.Add(row);
207 break;
208 case 5:
209 listSister.Add(row);
210 break;
211 case 6:
212 listFollower.Add(row);
213 break;
214 case 7:
215 listSnail.Add(row);
216 break;
217 }
218 }
219 }
220 listRemain.Shuffle();
221 listLantern.Shuffle();
222 listTree.Shuffle();
223 listPet.Shuffle();
224 listSister.Shuffle();
225 listFollower.Shuffle();
226 listSnail.Shuffle();
227 }
List< Row > listSister
List< Row > listRemain
List< Row > listLantern
List< Row > listFollower
List< Row > listSnail
List< Row > listPet
List< Row > listTree

References SourceBacker.Row.isStatic, listFollower, listLantern, listPet, listRemain, listSister, listSnail, listTree, SourceBacker.Row.type, and SourceBacker.Row.valid.

◆ SetRow()

override void SourceBacker.SetRow ( Row  r)
inline

Definition at line 173 of file SourceBacker.cs.

174 {
175 map[r.id] = r;
176 }

References SourceBacker.Row.id.

Member Data Documentation

◆ listFollower

List<Row> SourceBacker.listFollower = new List<Row>()

Definition at line 122 of file SourceBacker.cs.

Referenced by OnInit(), and Zone.TrySpawnFollower().

◆ listLantern

List<Row> SourceBacker.listLantern = new List<Row>()

Definition at line 110 of file SourceBacker.cs.

Referenced by TraitSpecialLantern.OnCreate(), and OnInit().

◆ listPet

List<Row> SourceBacker.listPet = new List<Row>()

Definition at line 116 of file SourceBacker.cs.

Referenced by Zone.ApplyBackerPet(), and OnInit().

◆ listRemain

List<Row> SourceBacker.listRemain = new List<Row>()

Definition at line 107 of file SourceBacker.cs.

Referenced by Map.ApplyBackerObj(), and OnInit().

◆ listSister

List<Row> SourceBacker.listSister = new List<Row>()

Definition at line 119 of file SourceBacker.cs.

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

◆ listSnail

List<Row> SourceBacker.listSnail = new List<Row>()

Definition at line 125 of file SourceBacker.cs.

Referenced by Zone_Casino.OnActivate(), and OnInit().

◆ listTree

List<Row> SourceBacker.listTree = new List<Row>()

Definition at line 113 of file SourceBacker.cs.

Referenced by Map.AddBackerTree(), Map.ApplyBackerObj(), and OnInit().

◆ RowMapping

readonly IReadOnlyDictionary<string, int> SourceBacker.RowMapping
static
Initial value:
= new Dictionary<string, int>
{
["id"] = 0,
["valid"] = 3,
["lang"] = 7,
["name"] = 8,
["text"] = 9,
["type"] = 10,
["skin"] = 11,
["gender"] = 12,
["tree"] = 13,
["deity"] = 14,
["chara"] = 15,
["loot"] = 16,
["isStatic"] = 17,
["done"] = 18,
["loc"] = 19,
["original"] = 20
}

Definition at line 66 of file SourceBacker.cs.

Referenced by GetRowMapping().

◆ TypeMapping

readonly IReadOnlyDictionary<string, string> SourceBacker.TypeMapping
static
Initial value:
= new Dictionary<string, string>
{
["id"] = "int",
["valid"] = "bool",
["lang"] = "string",
["name"] = "string",
["text"] = "string",
["type"] = "int",
["skin"] = "int",
["gender"] = "int",
["tree"] = "string",
["deity"] = "string",
["chara"] = "string",
["loot"] = "string",
["isStatic"] = "int",
["done"] = "bool",
["loc"] = "string",
["original"] = "string"
}

Definition at line 86 of file SourceBacker.cs.

Referenced by GetTypeMapping().


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