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

Classes

class  Row
 

Public Member Functions

override Row CreateRow ()
 
override void SetRow (Row r)
 
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 RenderData FallbackRenderData
 

Detailed Description

Definition at line 4 of file SourceFloor.cs.

Member Function Documentation

◆ BackupPref()

override void SourceFloor.BackupPref ( )
inline

Definition at line 119 of file SourceFloor.cs.

120 {
121 _rows.Clear();
122 foreach (Row row in rows)
123 {
124 _rows[row.id] = row;
125 }
126 }
Dictionary< int, Row > _rows
Definition: SourceFloor.cs:74

References _rows, and TileRow.id.

◆ CreateRow()

override Row SourceFloor.CreateRow ( )
inline

Definition at line 78 of file SourceFloor.cs.

79 {
80 return new Row
81 {
82 id = SourceData.GetInt(0),
83 alias = SourceData.GetString(1),
84 name_JP = SourceData.GetString(2),
85 name = SourceData.GetString(3),
86 sort = SourceData.GetInt(4),
87 idBiome = SourceData.GetString(5),
88 reqHarvest = SourceData.GetStringArray(6),
89 hp = SourceData.GetInt(7),
90 _tileType = SourceData.GetString(8),
91 _idRenderData = SourceData.GetString(9),
92 tiles = SourceData.GetIntArray(10),
93 colorMod = SourceData.GetInt(11),
94 value = SourceData.GetInt(12),
95 LV = SourceData.GetInt(13),
96 recipeKey = SourceData.GetStringArray(14),
97 factory = SourceData.GetStringArray(15),
98 components = SourceData.GetStringArray(16),
99 defMat = SourceData.GetString(17),
100 defBlock = SourceData.GetString(18),
101 bridgeBlock = SourceData.GetString(19),
102 category = SourceData.GetString(20),
103 edge = SourceData.GetInt(21),
104 autotile = SourceData.GetInt(22),
105 autotilePriority = SourceData.GetInt(23),
106 autotileBrightness = SourceData.GetFloat(24),
107 soundFoot = SourceData.GetString(25),
108 tag = SourceData.GetStringArray(26),
109 detail_JP = SourceData.GetString(27),
110 detail = SourceData.GetString(28)
111 };
112 }
static float GetFloat(int id)
Definition: SourceData.cs:726
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 int[] GetIntArray(int id)
Definition: SourceData.cs:736

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

◆ OnAfterImportData()

override void SourceFloor.OnAfterImportData ( )
inline

Definition at line 144 of file SourceFloor.cs.

145 {
146 int num = 0;
147 foreach (Row row in rows)
148 {
149 if (row.sort != 0)
150 {
151 num = row.sort;
152 }
153 row.sort = num;
154 num++;
155 }
156 rows.Sort((Row a, Row b) => a.id - b.id);
157 }

References TileRow.id, and RenderRow.sort.

◆ OnAfterInit()

void SourceFloor.OnAfterInit ( )
inline

Definition at line 169 of file SourceFloor.cs.

170 {
171 foreach (Row row in rows)
172 {
173 row._defBlock = EClass.sources.blocks.alias[row.defBlock];
174 row._bridgeBlock = EClass.sources.blocks.alias[row.bridgeBlock];
175 row.nonGradient = row.ContainsTag("nonGradient");
176 }
177 }
Definition: EClass.cs:5
static SourceManager sources
Definition: EClass.cs:42
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 159 of file SourceFloor.cs.

160 {
161 FallbackRenderData = ResourceCache.Load<RenderData>("Scene/Render/Data/floor");
162 Cell.floorList = rows;
163 foreach (Row row in rows)
164 {
165 row.Init();
166 }
167 }
void Init()
Definition: RenderData.cs:94
static RenderData FallbackRenderData
Definition: SourceFloor.cs:76

References FallbackRenderData, and TileRow.Init().

◆ RestorePref()

override void SourceFloor.RestorePref ( )
inline

Definition at line 128 of file SourceFloor.cs.

129 {
130 foreach (Row row in rows)
131 {
132 row.pref = _rows.TryGetValue(row.id)?.pref ?? new SourcePref();
133 }
134 }

References _rows, and TileRow.id.

◆ SetRow()

override void SourceFloor.SetRow ( Row  r)
inline

Definition at line 114 of file SourceFloor.cs.

115 {
116 map[r.id] = r;
117 }

References TileRow.id.

◆ ValidatePref()

override void SourceFloor.ValidatePref ( )
inline

Definition at line 136 of file SourceFloor.cs.

137 {
138 foreach (Row row in rows)
139 {
140 row.pref.Validate();
141 }
142 }

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

Member Data Documentation

◆ _rows

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

Definition at line 74 of file SourceFloor.cs.

Referenced by BackupPref(), and RestorePref().

◆ FallbackRenderData

RenderData SourceFloor.FallbackRenderData
static

Definition at line 76 of file SourceFloor.cs.

Referenced by OnInit().


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