220 protected string _GetThing(
string id)
229 return row.id +
"-(" + row.name_JP +
")";
235 protected void _SetThing(ref
string id,
string value)
237 id =
EClass.editorSources.things.rows.First((
SourceThing.
Row a) => a.id == value.Split(
'-', StringSplitOptions.None)[0]).id;
241 protected IEnumerable<string> ThingRows()
243 return EClass.editorSources.things.GetListString();
247 protected string _GetObj(
int id)
252 return string.Concat(
new string[]
266 protected void _SetObj(ref
int id,
string value)
268 id =
EClass.editorSources.objs.rows.First((
SourceObj.
Row a) => a.id ==
int.Parse(value.Split(
'-', StringSplitOptions.None)[0])).id;
272 protected IEnumerable<string> ObjRows()
274 return EClass.editorSources.objs.GetListString();
278 protected string _GetFloor(
int id)
283 return string.Concat(
new string[]
297 protected void _SetFloor(ref
int id,
string value)
299 id =
EClass.editorSources.floors.rows.First((
SourceFloor.
Row a) => a.id ==
int.Parse(value.Split(
'-', StringSplitOptions.None)[0])).id;
303 protected IEnumerable<string> FloorRows()
305 return EClass.editorSources.floors.GetListString();
309 protected string _GetBlock(
int id)
314 return string.Concat(
new string[]
328 protected void _SetBlock(ref
int id,
string value)
330 id =
EClass.editorSources.blocks.rows.First((
SourceBlock.
Row a) => a.id ==
int.Parse(value.Split(
'-', StringSplitOptions.None)[0])).id;
334 protected IEnumerable<string> BlockRows()
336 return EClass.editorSources.blocks.GetListString();
340 protected string _GetMat(
int id)
349 return string.Concat(
new string[]
363 protected void _SetMat(ref
int id,
string value)
365 id =
EClass.editorSources.materials.rows.First((
SourceMaterial.
Row a) => a.id ==
int.Parse(value.Split(
'-', StringSplitOptions.None)[0])).id;
369 protected IEnumerable<string> MatRows()
371 return EClass.editorSources.materials.GetListString();
375 protected string _GetSpawnList(
string id)
377 if (
id.IsEmpty() || !
EClass.editorSources.spawnLists.map.ContainsKey(
id))
390 protected void _SetSpawnList(ref
string id,
string value)
392 id = ((value ==
null) ?
"" :
EClass.editorSources.spawnLists.rows.First((
SourceSpawnList.
Row a) => a.id == value).id);
396 protected IEnumerable<string> _SpawnList()
398 return EClass.editorSources.spawnLists.GetListString();
439 return base._GetMat(this.mat);
443 base._SetMat(ref this.mat, value);
450 public string _matSub
454 return base._GetMat(this.matSub);
458 base._SetMat(ref this.matSub, value);
465 switch (this.dirType)
495 public BiomeProfile.BaseTile.SubType subType;
498 public BiomeProfile.BaseTile.DirType dirType;
589 public string _matDoor
593 return base._GetMat(this.matDoor);
597 base._SetMat(ref this.matDoor, value);
604 public string _matStairs
608 return base._GetMat(this.matStairs);
612 base._SetMat(ref this.matStairs, value);
617 public string GetIdLight(
bool wall)
619 if (this.lights.Count > 0)
623 if (
EClass.sources.cards.map[itemThing.id].tileType.UseMountHeight == wall)
637 public string GetIdStairs(
bool upstairs)
639 switch (this.stairsStyle)
662 return "stairsDown_cave";
664 return "stairs_cave";
669 public string GetIdDoor()
671 switch (this.doorStyle)
687 public float doorChance = 0.9f;
690 public BiomeProfile.DoorStyle doorStyle;
697 public BiomeProfile.StairsStyle stairsStyle;
701 public int matStairs;
919 public override bool TryCreate(
Point p)
922 if (Rand.Range(0f, 1f) > item.chance)
929 if (!item.IsSpawnOnBlock)
934 else if (item.IsSpawnOnBlock)
938 p.SetObj(item.idObj, 1, 0);
940 if (cell.sourceObj.HasGrowth && cell.sourceObj.id != 103)
942 cell.growth.SetRandomStage();
956 public override bool TryCreate(
Point p)
959 if (Rand.Range(0f, 1f) > itemThing.chance)
966 if (!itemThing.IsSpawnOnBlock)
971 else if (itemThing.IsSpawnOnBlock)
977 if (!itemThing.IsSpawnOnWater)
982 else if (itemThing.IsSpawnOnWater)
987 int desiredDir = thing.TileType.GetDesiredDir(p, 0);
988 if (desiredDir != -1)
990 thing.dir = desiredDir;
992 EClass._zone.AddCard(thing, p).Install();