1using System.Collections.Generic;
202 if (
x + 1 >=
Size ||
z <= 0)
214 if (
x <= 0 ||
z <= 0)
238 if (x <= 0 || z + 1 >=
Size)
250 GrowSystem.cell =
this;
689 return room.lot.idRoofStyle != 0;
771 return sourceBridge.Category.id ==
"floor_field";
773 return sourceFloor.Category.id ==
"floor_field";
909 return FrontRight.room !=
room;
949 return _dirs / 4 % 8;
987 return (
effect?.LiquidAmount ?? 0) / 3 + 1;
1002 if (cellDetail ==
null || cellDetail.
things.Count <= 0)
1207 bool hasBridge =
_bridge != 0;
1218 isSkyFloor = tileType2 != TileType.Sky && (cell2.sourceFloor.tileType == TileType.Sky || cell3.sourceFloor.tileType ==
TileType.
Sky);
1235 if ((cell10.
room !=
null && cell2.
sourceBlock.tileType.CastShadowSelf) || (cell9.room !=
null && cell3.
sourceBlock.tileType.CastShadowSelf))
1264 if (b5 - b - 4 > num)
1268 if (b4 - b - 4 > num)
1373 isWallEdge = !
blocked && cell2.sourceBlock.tileType.IsWallOrFence && cell2.blockDir != 1 && cell3.sourceBlock.tileType.IsWallOrFence && cell3.blockDir != 0;
1407 isShoreSand = cell4.sourceFloor.isBeach || cell2.sourceFloor.isBeach || cell3.sourceFloor.isBeach || cell.
sourceFloor.isBeach;
1419 autotile = (byte)(((IsAutoTileEdge(cell4) &&
z !=
Size - 1) ? 1 : 0) + ((IsAutoTileEdge(cell2) &&
x !=
Size - 1) ? 2 : 0) + ((IsAutoTileEdge(cell3) &&
z != 0) ? 4 : 0) + ((IsAutoTileEdge(cell) &&
x != 0) ? 8 : 0));
1427 autotileDeco = (byte)(((IsDecoAutoTileEdge(cell4) &&
z !=
Size - 1) ? 1 : 0) + ((IsDecoAutoTileEdge(cell2) &&
x !=
Size - 1) ? 2 : 0) + ((IsDecoAutoTileEdge(cell3) &&
z != 0) ? 4 : 0) + ((IsDecoAutoTileEdge(cell) &&
x != 0) ? 8 : 0));
1435 autotileBridge = (byte)(((IsBridgeAutoTileEdge(cell4) &&
z !=
Size - 1) ? 1 : 0) + ((IsBridgeAutoTileEdge(cell2) &&
x !=
Size - 1) ? 2 : 0) + ((IsBridgeAutoTileEdge(cell3) &&
z != 0) ? 4 : 0) + ((IsBridgeAutoTileEdge(cell) &&
x != 0) ? 8 : 0));
1443 autotileObj = (byte)(((IsObjAutoTileEdge(cell4) &&
z !=
Size - 1) ? 1 : 0) + ((IsObjAutoTileEdge(cell2) &&
x !=
Size - 1) ? 2 : 0) + ((IsObjAutoTileEdge(cell3) &&
z != 0) ? 4 : 0) + ((IsObjAutoTileEdge(cell) &&
x != 0) ? 8 : 0));
1457 bool IsAutoTileEdge(
Cell cell11)
1469 bool IsBridgeAutoTileEdge(
Cell cell11)
1477 bool IsDecoAutoTileEdge(
Cell cell11)
1489 bool IsObjAutoTileEdge(
Cell cell11)
1491 if (cell11.
obj !=
obj && (
obj != 31 || (cell11.
obj != 97 && cell11.
obj != 98)))
1506 int num2 = (sourceBlock.tileType.IsWallOrFence ? 3 :
sourceBlock._tiles.Length);
1526 num = sourceFloor._tiles.Length - 1;
1535 public void RotateObj(
bool reverse =
false,
bool useBlockDir =
false)
1538 num = ((!reverse) ? (num + 1) : (num - 1));
1541 num = sourceObj._tiles.Length - 1;
1559 bool flag = EInput.isShiftDown || Input.GetMouseButton(1);
1561 if (mouseTarget.
card !=
null)
1570 if (
sourceBlock.tileType.CanRotate(buildMode:
false))
1577 if (!
sourceObj.tileType.CanRotate(buildMode:
false))
1580 if (growSystem ==
null || !growSystem.
CanRotate())
1631 c.Thing.stackOrder = detail.things.Count - 1;
1682 text =
"_of2".lang(
matObj.GetName(), text);
1684 if (plantData !=
null && plantData.
size > 0)
1686 text =
Lang.
GetList(
"plant_size")[plantData.size - 1] + text;
1688 text = text.AddArticle();
1689 if (plantData !=
null)
1691 if (plantData.
seed !=
null)
1699 text = text +
"+" + plantData.
seed.
encLV;
1702 if (plantData.
fert != 0)
1704 text += ((plantData.fert > 0) ?
"fertilized" :
"defertilized").lang();
1713 string name = row.
Name;
1714 text = ((sourceObj.id == 82) ?
"backerRemain".lang(text, name) :
"backerTree".lang(text, name));
1727 GrowSystem.cell =
this;
1728 return obj.growth?.CanGrow(date) ??
false;
1784 return thing.Pref.height + 0.1f;
1829 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 SourceMaterial matSource
static List< SourceFloor.Row > floorList
bool CanBuildRamp(int dir)
SourceFloor.Row sourceFloor
SourceMaterial.Row matRoofBlock
SourceMaterial.Row matDeco
static SourceObj objSource
SourceMaterial.Row matObj
CellDetail GetOrCreateDetail()
SourceMaterial.Row matBridge
void TryGrow(VirtualDate date=null)
static List< SourceObj.Row > objList
SourceFloor.Row sourceBridge
override string ToString()
static SourceBlock blockSource
SourceMaterial.Row matFloor
static SourceFloor floorSource
SourceBlock.Row sourceRoofBlock
SourceCellEffect.Row sourceEffect
static SourceDeco decoSource
bool CanGrow(SourceObj.Row obj, VirtualDate date)
static SourceCellEffect effectSource
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