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

Static Public Attributes

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

Properties

TileLookup< Row > Lookup [get]
 
Row this[int id] [get]
 

Private Attributes

TileLookup< Row > _lookup
 

Detailed Description

Definition at line 4 of file SourceCellEffect.cs.

Member Function Documentation

◆ CreateRow()

override Row SourceCellEffect.CreateRow ( )
inline

Definition at line 80 of file SourceCellEffect.cs.

81 {
82 return new Row
83 {
84 id = SourceData.GetInt(0),
85 alias = SourceData.GetString(1),
86 name_JP = SourceData.GetString(2),
87 name = SourceData.GetString(3),
88 sort = SourceData.GetInt(4),
89 _tileType = SourceData.GetString(5),
90 _idRenderData = SourceData.GetString(6),
91 tiles = SourceData.GetIntArray(7),
92 anime = SourceData.GetIntArray(8),
93 colorMod = SourceData.GetInt(9),
94 value = SourceData.GetInt(10),
95 recipeKey = SourceData.GetStringArray(11),
96 factory = SourceData.GetStringArray(12),
97 components = SourceData.GetStringArray(13),
98 defMat = SourceData.GetString(14),
99 category = SourceData.GetString(15),
100 tag = SourceData.GetStringArray(16),
101 detail_JP = SourceData.GetString(17),
102 detail = SourceData.GetString(18)
103 };
104 }
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 int[] GetIntArray(int id)
Definition: SourceData.cs:1006

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

◆ CreateRowByMapping()

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

Definition at line 106 of file SourceCellEffect.cs.

107 {
108 return new Row
109 {
110 id = SourceData.GetInt(mapping["id"]),
111 alias = SourceData.GetString(mapping["alias"]),
112 name_JP = SourceData.GetString(mapping["name_JP"]),
113 name = SourceData.GetString(mapping["name"]),
114 sort = SourceData.GetInt(mapping["sort"]),
115 _tileType = SourceData.GetString(mapping["_tileType"]),
116 _idRenderData = SourceData.GetString(mapping["_idRenderData"]),
117 tiles = SourceData.GetIntArray(mapping["tiles"]),
118 anime = SourceData.GetIntArray(mapping["anime"]),
119 colorMod = SourceData.GetInt(mapping["colorMod"]),
120 value = SourceData.GetInt(mapping["value"]),
121 recipeKey = SourceData.GetStringArray(mapping["recipeKey"]),
122 factory = SourceData.GetStringArray(mapping["factory"]),
123 components = SourceData.GetStringArray(mapping["components"]),
124 defMat = SourceData.GetString(mapping["defMat"]),
125 category = SourceData.GetString(mapping["category"]),
126 tag = SourceData.GetStringArray(mapping["tag"]),
127 detail_JP = SourceData.GetString(mapping["detail_JP"]),
128 detail = SourceData.GetString(mapping["detail"])
129 };
130 }

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

◆ GetRowMapping()

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

Definition at line 137 of file SourceCellEffect.cs.

138 {
139 return RowMapping;
140 }
static readonly IReadOnlyDictionary< string, int > RowMapping

References RowMapping.

◆ GetTypeMapping()

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

Definition at line 142 of file SourceCellEffect.cs.

143 {
144 return TypeMapping;
145 }
static readonly IReadOnlyDictionary< string, string > TypeMapping

References TypeMapping.

◆ OnAfterImportData()

override void SourceCellEffect.OnAfterImportData ( )
inline

Definition at line 147 of file SourceCellEffect.cs.

148 {
149 int num = 0;
150 foreach (Row row in rows)
151 {
152 if (row.sort != 0)
153 {
154 num = row.sort;
155 }
156 row.sort = num;
157 num++;
158 }
159 rows.Sort((Row r) => r.id);
160 }

References TileRow.id, and RenderRow.sort.

◆ OnInit()

override void SourceCellEffect.OnInit ( )
inline

Definition at line 162 of file SourceCellEffect.cs.

163 {
164 Lookup.Build();
165 FallbackRenderData = ResourceCache.Load<RenderData>("Scene/Render/Data/liquid");
166 Cell.effectSource = this;
167 Cell.effectList = rows;
168 foreach (Row row in rows)
169 {
170 row.Init();
171 }
172 }
void Init()
Definition: RenderData.cs:95
static RenderData FallbackRenderData
TileLookup< Row > Lookup

References FallbackRenderData, TileRow.Init(), and Lookup.

◆ SetRow()

override void SourceCellEffect.SetRow ( Row  r)
inline

Definition at line 132 of file SourceCellEffect.cs.

133 {
134 map[r.id] = r;
135 }

References TileRow.id.

Member Data Documentation

◆ _lookup

TileLookup<Row> SourceCellEffect._lookup
private

Definition at line 74 of file SourceCellEffect.cs.

◆ FallbackRenderData

RenderData SourceCellEffect.FallbackRenderData
static

Definition at line 71 of file SourceCellEffect.cs.

Referenced by OnInit().

◆ RowMapping

readonly IReadOnlyDictionary<string, int> SourceCellEffect.RowMapping
static
Initial value:
= new Dictionary<string, int>
{
["id"] = 0,
["alias"] = 1,
["name_JP"] = 2,
["name"] = 3,
["sort"] = 4,
["_tileType"] = 5,
["_idRenderData"] = 6,
["tiles"] = 7,
["anime"] = 8,
["colorMod"] = 9,
["value"] = 10,
["recipeKey"] = 11,
["factory"] = 12,
["components"] = 13,
["defMat"] = 14,
["category"] = 15,
["tag"] = 16,
["detail_JP"] = 17,
["detail"] = 18
}

Definition at line 25 of file SourceCellEffect.cs.

Referenced by GetRowMapping().

◆ TypeMapping

readonly IReadOnlyDictionary<string, string> SourceCellEffect.TypeMapping
static
Initial value:
= new Dictionary<string, string>
{
["id"] = "int",
["alias"] = "string",
["name_JP"] = "string",
["name"] = "string",
["sort"] = "int",
["_tileType"] = "string",
["_idRenderData"] = "string",
["tiles"] = "int[]",
["anime"] = "int[]",
["colorMod"] = "int",
["value"] = "int",
["recipeKey"] = "string[]",
["factory"] = "string[]",
["components"] = "string[]",
["defMat"] = "string",
["category"] = "string",
["tag"] = "string[]",
["detail_JP"] = "string",
["detail"] = "string"
}

Definition at line 48 of file SourceCellEffect.cs.

Referenced by GetTypeMapping().

Property Documentation

◆ Lookup

TileLookup<Row> SourceCellEffect.Lookup
getprivate

Definition at line 76 of file SourceCellEffect.cs.

Referenced by OnInit().

◆ this[int id]

Row SourceCellEffect.this[int id]
get

Definition at line 78 of file SourceCellEffect.cs.


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