2using System.Collections.Generic;
77 public static readonly IReadOnlyDictionary<string, int>
RowMapping =
new Dictionary<string, int>
88 [
"_idRenderData"] = 9,
103 [
"autotilePriority"] = 24,
104 [
"autotileBrightness"] = 25,
111 public static readonly IReadOnlyDictionary<string, string>
TypeMapping =
new Dictionary<string, string>
114 [
"alias"] =
"string",
115 [
"name_JP"] =
"string",
118 [
"idBiome"] =
"string",
119 [
"reqHarvest"] =
"string[]",
121 [
"_tileType"] =
"string",
122 [
"_idRenderData"] =
"string",
125 [
"colorMod"] =
"int",
128 [
"recipeKey"] =
"string[]",
129 [
"factory"] =
"string[]",
130 [
"components"] =
"string[]",
131 [
"defMat"] =
"string",
132 [
"defBlock"] =
"string",
133 [
"bridgeBlock"] =
"string",
134 [
"category"] =
"string",
136 [
"autotile"] =
"int",
137 [
"autotilePriority"] =
"int",
138 [
"autotileBrightness"] =
"float",
139 [
"soundFoot"] =
"string",
140 [
"tag"] =
"string[]",
141 [
"detail_JP"] =
"string",
142 [
"detail"] =
"string"
145 public Dictionary<int, Row>
_rows =
new Dictionary<int, Row>();
248 foreach (
Row row
in rows)
256 foreach (
Row row
in rows)
264 foreach (
Row row
in rows)
273 foreach (
Row row
in rows)
282 rows.Sort((
Row r) => r.
id);
289 Cell.floorSource =
this;
290 Cell.floorList = rows;
291 FLOOR.sourceSnow =
this[39];
292 FLOOR.sourceSnow2 =
this[56];
293 FLOOR.sourceIce =
this[38];
294 FLOOR.sourceWood =
this[21];
295 foreach (
Row row
in rows)
304 foreach (
Row row2
in rows)
306 row2._defBlock = Resolve(row2, row2.
defBlock);
307 row2._bridgeBlock = Resolve(row2, row2.
bridgeBlock);
308 row2.nonGradient = row2.
ContainsTag(
"nonGradient");
315 Debug.LogWarning(
$"#source floor {r.id}/{r.alias} has invalid block alias '{aliasName}'");
static SourceManager sources
bool ContainsTag(string _tag)
static float GetFloat(int id)
static string[] GetStringArray(int id)
static string GetString(int id)
static int GetInt(int id)
static int[] GetIntArray(int id)
SourceBlock.Row _defBlock
SourceBlock.Row _bridgeBlock
override RenderData defaultRenderData
override int GetTile(SourceMaterial.Row mat, int dir=0)
static readonly IReadOnlyDictionary< string, string > TypeMapping
override void RestorePref()
override void ValidatePref()
override Row CreateRowByMapping(IReadOnlyDictionary< string, int > mapping)
Dictionary< int, Row > _rows
TileLookup< Row > _lookup
override IReadOnlyDictionary< string, string > GetTypeMapping()
override IReadOnlyDictionary< string, int > GetRowMapping()
static RenderData FallbackRenderData
override void SetRow(Row r)
override void BackupPref()
static readonly IReadOnlyDictionary< string, int > RowMapping
override void OnAfterImportData()