Elin Decompiled Documentation EA 23.309 Nightly Patch 1
Loading...
Searching...
No Matches
SourceFloor Class Reference
Inheritance diagram for SourceFloor:
SourceDataInt< SourceFloor.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 BackupPref ()
 
override void RestorePref ()
 
override void ValidatePref ()
 
override void OnAfterImportData ()
 
override void OnInit ()
 
void OnAfterInit ()
 
- Public Member Functions inherited from SourceDataInt< SourceFloor.Row >
override T GetRow (string id)
 

Public Attributes

Dictionary< int, Row_rows = new Dictionary<int, Row>()
 

Static Public Attributes

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

Detailed Description

Definition at line 4 of file SourceFloor.cs.

Member Function Documentation

◆ BackupPref()

override void SourceFloor.BackupPref ( )
inline

Definition at line 237 of file SourceFloor.cs.

238 {
239 _rows.Clear();
240 foreach (Row row in rows)
241 {
242 _rows[row.id] = row;
243 }
244 }
Dictionary< int, Row > _rows
Definition: SourceFloor.cs:144

References _rows, and TileRow.id.

◆ CreateRow()

override Row SourceFloor.CreateRow ( )
inline

Definition at line 148 of file SourceFloor.cs.

149 {
150 return new Row
151 {
152 id = SourceData.GetInt(0),
153 alias = SourceData.GetString(1),
154 name_JP = SourceData.GetString(2),
155 name = SourceData.GetString(3),
156 sort = SourceData.GetInt(4),
157 idBiome = SourceData.GetString(5),
158 reqHarvest = SourceData.GetStringArray(6),
159 hp = SourceData.GetInt(7),
160 _tileType = SourceData.GetString(8),
161 _idRenderData = SourceData.GetString(9),
162 tiles = SourceData.GetIntArray(10),
163 anime = SourceData.GetIntArray(11),
164 colorMod = SourceData.GetInt(12),
165 value = SourceData.GetInt(13),
166 LV = SourceData.GetInt(14),
167 recipeKey = SourceData.GetStringArray(15),
168 factory = SourceData.GetStringArray(16),
169 components = SourceData.GetStringArray(17),
170 defMat = SourceData.GetString(18),
171 defBlock = SourceData.GetString(19),
172 bridgeBlock = SourceData.GetString(20),
173 category = SourceData.GetString(21),
174 edge = SourceData.GetInt(22),
175 autotile = SourceData.GetInt(23),
176 autotilePriority = SourceData.GetInt(24),
177 autotileBrightness = SourceData.GetFloat(25),
178 soundFoot = SourceData.GetString(26),
179 tag = SourceData.GetStringArray(27),
180 detail_JP = SourceData.GetString(28),
181 detail = SourceData.GetString(29)
182 };
183 }
static float GetFloat(int id)
Definition: SourceData.cs:968
static string[] GetStringArray(int id)
Definition: SourceData.cs:983
static string GetString(int id)
Definition: SourceData.cs:988
static int GetInt(int id)
Definition: SourceData.cs:953
static int[] GetIntArray(int id)
Definition: SourceData.cs:978

References SourceData< T, T2 >.GetFloat(), SourceData< T, T2 >.GetInt(), SourceData< T, T2 >.GetIntArray(), SourceData< T, T2 >.GetString(), and SourceData< T, T2 >.GetStringArray().

◆ CreateRowByMapping()

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

Definition at line 185 of file SourceFloor.cs.

186 {
187 return new Row
188 {
189 id = SourceData.GetInt(mapping["id"]),
190 alias = SourceData.GetString(mapping["alias"]),
191 name_JP = SourceData.GetString(mapping["name_JP"]),
192 name = SourceData.GetString(mapping["name"]),
193 sort = SourceData.GetInt(mapping["sort"]),
194 idBiome = SourceData.GetString(mapping["idBiome"]),
195 reqHarvest = SourceData.GetStringArray(mapping["reqHarvest"]),
196 hp = SourceData.GetInt(mapping["hp"]),
197 _tileType = SourceData.GetString(mapping["_tileType"]),
198 _idRenderData = SourceData.GetString(mapping["_idRenderData"]),
199 tiles = SourceData.GetIntArray(mapping["tiles"]),
200 anime = SourceData.GetIntArray(mapping["anime"]),
201 colorMod = SourceData.GetInt(mapping["colorMod"]),
202 value = SourceData.GetInt(mapping["value"]),
203 LV = SourceData.GetInt(mapping["LV"]),
204 recipeKey = SourceData.GetStringArray(mapping["recipeKey"]),
205 factory = SourceData.GetStringArray(mapping["factory"]),
206 components = SourceData.GetStringArray(mapping["components"]),
207 defMat = SourceData.GetString(mapping["defMat"]),
208 defBlock = SourceData.GetString(mapping["defBlock"]),
209 bridgeBlock = SourceData.GetString(mapping["bridgeBlock"]),
210 category = SourceData.GetString(mapping["category"]),
211 edge = SourceData.GetInt(mapping["edge"]),
212 autotile = SourceData.GetInt(mapping["autotile"]),
213 autotilePriority = SourceData.GetInt(mapping["autotilePriority"]),
214 autotileBrightness = SourceData.GetFloat(mapping["autotileBrightness"]),
215 soundFoot = SourceData.GetString(mapping["soundFoot"]),
216 tag = SourceData.GetStringArray(mapping["tag"]),
217 detail_JP = SourceData.GetString(mapping["detail_JP"]),
218 detail = SourceData.GetString(mapping["detail"])
219 };
220 }

References SourceData< T, T2 >.GetFloat(), SourceData< T, T2 >.GetInt(), SourceData< T, T2 >.GetIntArray(), SourceData< T, T2 >.GetString(), and SourceData< T, T2 >.GetStringArray().

◆ GetRowMapping()

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

Definition at line 227 of file SourceFloor.cs.

228 {
229 return RowMapping;
230 }
static readonly IReadOnlyDictionary< string, int > RowMapping
Definition: SourceFloor.cs:76

References RowMapping.

◆ GetTypeMapping()

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

Definition at line 232 of file SourceFloor.cs.

233 {
234 return TypeMapping;
235 }
static readonly IReadOnlyDictionary< string, string > TypeMapping
Definition: SourceFloor.cs:110

References TypeMapping.

◆ OnAfterImportData()

override void SourceFloor.OnAfterImportData ( )
inline

Definition at line 262 of file SourceFloor.cs.

263 {
264 int num = 0;
265 foreach (Row row in rows)
266 {
267 if (row.sort != 0)
268 {
269 num = row.sort;
270 }
271 row.sort = num;
272 num++;
273 }
274 rows.Sort((Row a, Row b) => a.id - b.id);
275 }

References TileRow.id, and RenderRow.sort.

◆ OnAfterInit()

void SourceFloor.OnAfterInit ( )
inline

Definition at line 287 of file SourceFloor.cs.

288 {
289 foreach (Row row in rows)
290 {
291 row._defBlock = EClass.sources.blocks.alias[row.defBlock];
292 row._bridgeBlock = EClass.sources.blocks.alias[row.bridgeBlock];
293 row.nonGradient = row.ContainsTag("nonGradient");
294 }
295 }
Definition: EClass.cs:6
static SourceManager sources
Definition: EClass.cs:43
SourceBlock blocks

References SourceManager.blocks, SourceFloor.Row.bridgeBlock, RenderRow.ContainsTag(), SourceFloor.Row.defBlock, and EClass.sources.

Referenced by SourceManager.Init().

◆ OnInit()

override void SourceFloor.OnInit ( )
inline

Definition at line 277 of file SourceFloor.cs.

278 {
279 FallbackRenderData = ResourceCache.Load<RenderData>("Scene/Render/Data/floor");
280 Cell.floorList = rows;
281 foreach (Row row in rows)
282 {
283 row.Init();
284 }
285 }
void Init()
Definition: RenderData.cs:95
static RenderData FallbackRenderData
Definition: SourceFloor.cs:146

References FallbackRenderData, and TileRow.Init().

◆ RestorePref()

override void SourceFloor.RestorePref ( )
inline

Definition at line 246 of file SourceFloor.cs.

247 {
248 foreach (Row row in rows)
249 {
250 row.pref = _rows.TryGetValue(row.id)?.pref ?? new SourcePref();
251 }
252 }

References _rows, and TileRow.id.

◆ SetRow()

override void SourceFloor.SetRow ( Row  r)
inline

Definition at line 222 of file SourceFloor.cs.

223 {
224 map[r.id] = r;
225 }

References TileRow.id.

◆ ValidatePref()

override void SourceFloor.ValidatePref ( )
inline

Definition at line 254 of file SourceFloor.cs.

255 {
256 foreach (Row row in rows)
257 {
258 row.pref.Validate();
259 }
260 }

References RenderRow.pref, and SourcePref.Validate().

Member Data Documentation

◆ _rows

Dictionary<int, Row> SourceFloor._rows = new Dictionary<int, Row>()

Definition at line 144 of file SourceFloor.cs.

Referenced by BackupPref(), and RestorePref().

◆ FallbackRenderData

RenderData SourceFloor.FallbackRenderData
static

Definition at line 146 of file SourceFloor.cs.

Referenced by OnInit().

◆ RowMapping

readonly IReadOnlyDictionary<string, int> SourceFloor.RowMapping
static

Definition at line 76 of file SourceFloor.cs.

Referenced by GetRowMapping().

◆ TypeMapping

readonly IReadOnlyDictionary<string, string> SourceFloor.TypeMapping
static

Definition at line 110 of file SourceFloor.cs.

Referenced by GetTypeMapping().


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