Elin Decompiled Documentation EA 23.306 Nightly
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 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
 

Detailed Description

Definition at line 4 of file SourceBacker.cs.

Member Function Documentation

◆ CreateRow()

override Row SourceBacker.CreateRow ( )
inline

Definition at line 107 of file SourceBacker.cs.

108 {
109 return new Row
110 {
111 id = SourceData.GetInt(0),
112 valid = SourceData.GetBool(3),
113 lang = SourceData.GetString(7),
114 name = SourceData.GetString(8),
115 text = SourceData.GetString(9),
116 type = SourceData.GetInt(10),
117 skin = SourceData.GetInt(11),
118 gender = SourceData.GetInt(12),
119 tree = SourceData.GetString(13),
120 deity = SourceData.GetString(14),
121 chara = SourceData.GetString(15),
122 loot = SourceData.GetString(16),
123 isStatic = SourceData.GetInt(17),
124 done = SourceData.GetBool(18),
125 loc = SourceData.GetString(19),
126 original = SourceData.GetString(20)
127 };
128 }
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

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 130 of file SourceBacker.cs.

131 {
132 return new Row
133 {
134 id = SourceData.GetInt(mapping["id"]),
135 valid = SourceData.GetBool(mapping["valid"]),
136 lang = SourceData.GetString(mapping["lang"]),
137 name = SourceData.GetString(mapping["name"]),
138 text = SourceData.GetString(mapping["text"]),
139 type = SourceData.GetInt(mapping["type"]),
140 skin = SourceData.GetInt(mapping["skin"]),
141 gender = SourceData.GetInt(mapping["gender"]),
142 tree = SourceData.GetString(mapping["tree"]),
143 deity = SourceData.GetString(mapping["deity"]),
144 chara = SourceData.GetString(mapping["chara"]),
145 loot = SourceData.GetString(mapping["loot"]),
146 isStatic = SourceData.GetInt(mapping["isStatic"]),
147 done = SourceData.GetBool(mapping["done"]),
148 loc = SourceData.GetString(mapping["loc"]),
149 original = SourceData.GetString(mapping["original"])
150 };
151 }

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 158 of file SourceBacker.cs.

159 {
160 return RowMapping;
161 }
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: SourceBacker.cs:66

References RowMapping.

◆ OnInit()

override void SourceBacker.OnInit ( )
inline

Definition at line 163 of file SourceBacker.cs.

164 {
165 foreach (Row row in rows)
166 {
167 if (row.isStatic == 0 && row.valid)
168 {
169 switch (row.type)
170 {
171 case 1:
172 listRemain.Add(row);
173 break;
174 case 2:
175 listLantern.Add(row);
176 break;
177 case 3:
178 listTree.Add(row);
179 break;
180 case 4:
181 listPet.Add(row);
182 break;
183 case 5:
184 listSister.Add(row);
185 break;
186 case 6:
187 listFollower.Add(row);
188 break;
189 case 7:
190 listSnail.Add(row);
191 break;
192 }
193 }
194 }
195 listRemain.Shuffle();
196 listLantern.Shuffle();
197 listTree.Shuffle();
198 listPet.Shuffle();
199 listSister.Shuffle();
200 listFollower.Shuffle();
201 listSnail.Shuffle();
202 }
List< Row > listSister
Definition: SourceBacker.cs:99
List< Row > listRemain
Definition: SourceBacker.cs:87
List< Row > listLantern
Definition: SourceBacker.cs:90
List< Row > listFollower
List< Row > listSnail
List< Row > listPet
Definition: SourceBacker.cs:96
List< Row > listTree
Definition: SourceBacker.cs:93

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 153 of file SourceBacker.cs.

154 {
155 map[r.id] = r;
156 }

References SourceBacker.Row.id.

Member Data Documentation

◆ listFollower

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

Definition at line 102 of file SourceBacker.cs.

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

◆ listLantern

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

Definition at line 90 of file SourceBacker.cs.

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

◆ listPet

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

Definition at line 96 of file SourceBacker.cs.

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

◆ listRemain

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

Definition at line 87 of file SourceBacker.cs.

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

◆ listSister

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

Definition at line 99 of file SourceBacker.cs.

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

◆ listSnail

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

Definition at line 105 of file SourceBacker.cs.

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

◆ listTree

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

Definition at line 93 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().


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