1using System.Collections.Generic;
188 if (
x + 1 >=
Size ||
z <= 0)
200 if (
x <= 0 ||
z <= 0)
224 if (x <= 0 || z + 1 >=
Size)
236 GrowSystem.cell =
this;
661 return room.lot.idRoofStyle != 0;
743 return sourceBridge.Category.id ==
"floor_field";
745 return sourceFloor.Category.id ==
"floor_field";
881 return FrontRight.room !=
room;
921 return _dirs / 4 % 8;
959 return (
effect?.LiquidAmount ?? 0) / 3 + 1;
974 if (cellDetail ==
null || cellDetail.
things.Count <= 0)
1179 bool hasBridge =
_bridge != 0;
1190 isSkyFloor = tileType2 != TileType.Sky && (cell3.sourceFloor.tileType == TileType.Sky || cell4.sourceFloor.tileType ==
TileType.
Sky);
1207 if ((cell11.
room !=
null && cell3.
sourceBlock.tileType.CastShadowSelf) || (cell10.room !=
null && cell4.
sourceBlock.tileType.CastShadowSelf))
1236 if (b5 - b - 4 > num)
1240 if (b4 - b - 4 > num)
1345 isWallEdge = !
blocked && cell3.sourceBlock.tileType.IsWallOrFence && cell3.blockDir != 1 && cell4.sourceBlock.tileType.IsWallOrFence && cell4.blockDir != 0;
1379 isShoreSand = cell5.sourceFloor.isBeach || cell3.sourceFloor.isBeach || cell4.sourceFloor.isBeach || cell2.
sourceFloor.isBeach;
1391 autotile = (byte)(((IsAutoTileEdge(cell5) &&
z !=
Size - 1) ? 1 : 0) + ((IsAutoTileEdge(cell3) &&
x !=
Size - 1) ? 2 : 0) + ((IsAutoTileEdge(cell4) &&
z != 0) ? 4 : 0) + ((IsAutoTileEdge(cell2) &&
x != 0) ? 8 : 0));
1399 autotileDeco = (byte)(((IsDecoAutoTileEdge(cell5) &&
z !=
Size - 1) ? 1 : 0) + ((IsDecoAutoTileEdge(cell3) &&
x !=
Size - 1) ? 2 : 0) + ((IsDecoAutoTileEdge(cell4) &&
z != 0) ? 4 : 0) + ((IsDecoAutoTileEdge(cell2) &&
x != 0) ? 8 : 0));
1407 autotileBridge = (byte)(((IsBridgeAutoTileEdge(cell5) &&
z !=
Size - 1) ? 1 : 0) + ((IsBridgeAutoTileEdge(cell3) &&
x !=
Size - 1) ? 2 : 0) + ((IsBridgeAutoTileEdge(cell4) &&
z != 0) ? 4 : 0) + ((IsBridgeAutoTileEdge(cell2) &&
x != 0) ? 8 : 0));
1415 autotileObj = (byte)(((IsObjAutoTileEdge(cell5) &&
z !=
Size - 1) ? 1 : 0) + ((IsObjAutoTileEdge(cell3) &&
x !=
Size - 1) ? 2 : 0) + ((IsObjAutoTileEdge(cell4) &&
z != 0) ? 4 : 0) + ((IsObjAutoTileEdge(cell2) &&
x != 0) ? 8 : 0));
1429 bool IsAutoTileEdge(
Cell cell)
1441 bool IsBridgeAutoTileEdge(
Cell cell)
1449 bool IsDecoAutoTileEdge(
Cell cell)
1461 bool IsObjAutoTileEdge(
Cell cell)
1463 if (cell.
obj !=
obj && (
obj != 31 || (cell.
obj != 97 && cell.
obj != 98)))
1478 int num2 = (sourceBlock.tileType.IsWallOrFence ? 3 :
sourceBlock._tiles.Length);
1498 num = sourceFloor._tiles.Length - 1;
1507 public void RotateObj(
bool reverse =
false,
bool useBlockDir =
false)
1510 num = ((!reverse) ? (num + 1) : (num - 1));
1513 num = sourceObj._tiles.Length - 1;
1531 bool flag = EInput.isShiftDown || Input.GetMouseButton(1);
1533 if (mouseTarget.
card !=
null)
1542 if (
sourceBlock.tileType.CanRotate(buildMode:
false))
1549 if (
sourceObj.tileType.CanRotate(buildMode:
false))
1595 c.Thing.stackOrder = detail.things.Count - 1;
1646 text =
"_of2".lang(
matObj.GetName(), text);
1648 if (plantData !=
null && plantData.
size > 0)
1650 text =
Lang.
GetList(
"plant_size")[plantData.size - 1] + text;
1652 text = text.AddArticle();
1653 if (plantData !=
null)
1655 if (plantData.
seed !=
null)
1663 text = text +
"+" + plantData.
seed.
encLV;
1666 if (plantData.
fert != 0)
1668 text += ((plantData.fert > 0) ?
"fertilized" :
"defertilized").lang();
1677 string name = row.
Name;
1678 text = ((sourceObj.id == 82) ?
"backerRemain".lang(text, name) :
"backerTree".lang(text, name));
1691 GrowSystem.cell =
this;
1692 return obj.growth?.CanGrow(date) ??
false;
1742 return thing.Pref.height + 0.1f;
1787 return detail.charas.Count > 0;
void Add(Act a, string s="")
virtual void Rotate(bool reverse=false)
virtual CardRow sourceCard
static CellDetail Spawn()
SourceCellEffect.Row source
override int GetHashCode()
static List< SourceBlock.Row > blockList
SourceBlock.Row sourceBlock
SourceMaterial.Row matBlock
static List< SourceDeco.Row > decoList
static List< SourceFloor.Row > floorList
bool CanBuildRamp(int dir)
SourceFloor.Row sourceFloor
SourceMaterial.Row matRoofBlock
SourceMaterial.Row matDeco
SourceMaterial.Row matObj
CellDetail GetOrCreateDetail()
SourceMaterial.Row matBridge
void TryGrow(VirtualDate date=null)
static List< SourceObj.Row > objList
SourceFloor.Row sourceBridge
override string ToString()
SourceMaterial.Row matFloor
SourceBlock.Row sourceRoofBlock
SourceCellEffect.Row sourceEffect
bool CanGrow(SourceObj.Row obj, VirtualDate date)
static List< SourceCellEffect.Row > effectList
void RotateObj(bool reverse=false, bool useBlockDir=false)
override bool IsPathBlocked(IPathfindWalker walker, PathManager.MoveType moveType)
SourceFloor.Row sourceSurface
bool HasFullBlockOrWallOrFence
static List< SourceMaterial.Row > matList
bool HasZoneStairs(bool includeLocked=true)
SourceDeco.Row sourceDeco
SourceMaterial.Row matObj_fixed
override bool Equals(object obj)
BackerContentConfig backer
static SourceManager sources
void TryGrow(VirtualDate date)
virtual bool CanReapSeed()
virtual bool BlockSight(Cell cell)
static string[] GetList(string id)
static string Parse(string idLang, string val1, string val2=null, string val3=null, string val4=null, string val5=null)
PlantData TryGetPlant(Point p)
Dictionary< int, int > gatherCounts
Dictionary< int, int > backerObjs
Point Set(int _x, int _z)
void RefreshNeighborTiles()
virtual bool IsSnowCovered
static TileTypeHalfBlock HalfBlock
static TileTypeSlope Slope
static TileTypeStairs Stairs
virtual bool IsBlockSight
virtual bool ShouldRefreshTile
virtual bool IsUnderwater