Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
Cell Class Reference
Inheritance diagram for Cell:
Algorithms.WeightCell

Public Member Functions

override bool Equals (object obj)
 
override string ToString ()
 
override int GetHashCode ()
 
Point GetPoint ()
 
Point GetSharedPoint ()
 
bool CanSuffocate ()
 
bool HasObstacle ()
 
bool CanBuildRamp (int dir)
 
void Refresh ()
 
void RotateBlock (int a)
 
void RotateFloor (int a)
 
void RotateObj (bool reverse=false, bool useBlockDir=false)
 
void RotateAll ()
 
void Reset ()
 
CellDetail GetOrCreateDetail ()
 
void TryDespawnDetail ()
 
void AddCard (Card c)
 
void RemoveCard (Card c)
 
string GetBlockName ()
 
string GetFloorName ()
 
string GetBridgeName ()
 
string GetObjName ()
 
string GetLiquidName ()
 
bool CanGrow (SourceObj.Row obj, VirtualDate date)
 
void TryGrow (VirtualDate date=null)
 
bool CanHarvest ()
 
bool CanReapSeed ()
 
bool CanMakeStraw ()
 
PlantData TryGetPlant ()
 
float GetSurfaceHeight ()
 
bool HasZoneStairs (bool includeLocked=true)
 
override bool IsPathBlocked (PathManager.MoveType moveType)
 
virtual bool IsPathBlocked (PathManager.MoveType moveType)
 

Public Attributes

byte _dirs
 
byte _block
 
byte _blockMat
 
byte _floor
 
byte _floorMat
 
byte obj
 
byte objVal
 
byte objMat
 
byte decal
 
byte _bridge
 
byte _bridgeMat
 
byte _roofBlock
 
byte _roofBlockMat
 
byte _roofBlockDir
 
byte x
 
byte z
 
byte light
 
byte autotile
 
byte autotileBridge
 
byte autotileObj
 
byte shore
 
byte shadow
 
byte height
 
byte bridgeHeight
 
byte shadowMod
 
byte topHeight
 
byte minHeight
 
byte bridgePillar
 
byte highlight
 
ushort lightR
 
ushort lightG
 
ushort lightB
 
CellDetail detail
 
CellEffect effect
 
Critter critter
 
BitArray32 bits
 
BitArray32 bits2
 
Room room
 
bool pcSync
 
- Public Attributes inherited from Algorithms.WeightCell
bool blocked
 
byte[] weights = new byte[4]
 
byte baseWeight
 

Static Public Attributes

static Map map
 
static Cell Void = new Cell()
 
static List< SourceMaterial.RowmatList
 
static List< SourceBlock.RowblockList
 
static List< SourceFloor.RowfloorList
 
static List< SourceCellEffect.RoweffectList
 
static List< SourceObj.RowobjList
 
static int Size
 
static Cell[,] cells
 
const int DivAutotile = 12
 
const int DIV_LIQUID = 10
 
const int DivStage = 30
 

Properties

int index [get]
 
byte TopHeight [get]
 
Cell Front [get]
 
Cell Right [get]
 
Cell Back [get]
 
Cell Left [get]
 
Cell FrontRight [get]
 
Cell FrontLeft [get]
 
Cell BackRight [get]
 
Cell BackLeft [get]
 
GrowSystem growth [get]
 
bool isSurrounded [get, set]
 
bool isShadowed [get, set]
 
bool hasDoor [get, set]
 
bool skipRender [get, set]
 
bool isSeen [get, set]
 
bool isSurrounded4d [get, set]
 
bool isForceFloat [get, set]
 
bool blockSight [get, set]
 
bool isHarvested [get, set]
 
bool isWatered [get, set]
 
bool isSlopeEdge [get, set]
 
bool isBridgeEdge [get, set]
 
bool ignoreObjShadow [get, set]
 
bool nonGradient [get, set]
 
bool impassable [get, set]
 
bool outOfBounds [get, set]
 
bool isWallEdge [get, set]
 
bool isModified [get, set]
 
bool isClearSnow [get, set]
 
bool fullWall [get, set]
 
bool isFloating [get, set]
 
bool lotWall [get, set]
 
bool hasDoorBoat [get, set]
 
bool isDeck [get, set]
 
bool castFloorShadow [get, set]
 
bool lotShade [get, set]
 
bool isShoreSand [get, set]
 
bool isToggleWallPillar [get, set]
 
bool hasWindow [get, set]
 
bool isCurtainClosed [get, set]
 
bool isSkyFloor [get, set]
 
bool isClearArea [get, set]
 
bool isObjDyed [get, set]
 
bool crossWall [get, set]
 
bool HasObj [get]
 
bool HasBlock [get]
 
bool HasFloor [get]
 
bool HasRoof [get]
 
bool HasFloorOrBlock [get]
 
bool HasBridge [get]
 
bool HasLiquid [get]
 
bool HasFire [get]
 
bool IsNotWaterEdge [get]
 
bool IsTopWater [get]
 
bool IsTopWaterAndNoSnow [get]
 
bool IsFloorWater [get]
 
bool IsFarmField [get]
 
bool CanGrowWeed [get]
 
bool IsBridgeWater [get]
 
bool IsSnowTile [get]
 
bool IsDeepWater [get]
 
bool IsIceTile [get]
 
bool HasFullBlock [get]
 
bool HasFullBlockOrWallOrFence [get]
 
bool HasWallOrFence [get]
 
bool HasWall [get]
 
bool HasFence [get]
 
bool HasRamp [get]
 
bool HasLadder [get]
 
bool HasRampOrLadder [get]
 
bool HasSlope [get]
 
bool HasStairs [get]
 
bool HasHalfBlock [get]
 
bool HasBlockOrRamp [get]
 
bool UseLowBlock [get]
 
bool CastShadow [get]
 
bool CastAmbientShadow [get]
 
bool IsRoomEdge [get]
 
bool IsLotEdge [get]
 
bool IsBlocked [get]
 
int blockDir [get, set]
 
int objDir [get, set]
 
int floorDir [get, set]
 
bool IsSky [get]
 
int liquidLv [get]
 
int fireAmount [get]
 
bool IsVoid [get]
 
Thing FirstThing [get]
 
Thing Installed [get]
 
List< ThingThings [get]
 
List< CharaCharas [get]
 
int gatherCount [get, set]
 
bool HasFloodBlock [get]
 
SourceMaterial.Row matRoofBlock [get]
 
SourceMaterial.Row matBlock [get]
 
SourceMaterial.Row matFloor [get]
 
SourceMaterial.Row matBridge [get]
 
SourceMaterial.Row matObj [get]
 
SourceMaterial.Row matObj_fixed [get]
 
SourceBlock.Row sourceRoofBlock [get]
 
SourceBlock.Row sourceBlock [get]
 
SourceFloor.Row sourceFloor [get]
 
SourceFloor.Row sourceBridge [get]
 
SourceFloor.Row sourceSurface [get]
 
SourceCellEffect.Row sourceEffect [get]
 
SourceObj.Row sourceObj [get]
 
BiomeProfile biome [get]
 

Static Private Attributes

static bool openSight
 
static bool openPath
 

Detailed Description

Definition at line 6 of file Cell.cs.

Member Function Documentation

◆ AddCard()

void Cell.AddCard ( Card  c)
inline

Definition at line 1546 of file Cell.cs.

1547 {
1549 if (c.isChara)
1550 {
1551 detail.charas.Add(c.Chara);
1552 return;
1553 }
1555 c.Thing.stackOrder = detail.things.Count - 1;
1557 {
1559 }
1560 }
void Add(Act a, string s="")
Definition: ActPlan.cs:11
virtual Chara Chara
Definition: Card.cs:1946
Trait trait
Definition: Card.cs:49
virtual bool isChara
Definition: Card.cs:1959
virtual Thing Thing
Definition: Card.cs:1934
virtual CardRow sourceCard
Definition: Card.cs:2007
List< Thing > things
Definition: CellDetail.cs:11
List< Chara > charas
Definition: CellDetail.cs:13
CellDetail GetOrCreateDetail()
Definition: Cell.cs:1529
CellDetail detail
Definition: Cell.cs:92
Point GetPoint()
Definition: Cell.cs:1101
void RefreshNeighborTiles()
Definition: Point.cs:1240
bool multisize
Definition: RenderRow.cs:64
virtual bool ShouldRefreshTile
Definition: Trait.cs:71

References ActPlan.List.Add(), Card.Chara, CellDetail.charas, detail, GetOrCreateDetail(), GetPoint(), Card.isChara, RenderRow.multisize, Point.RefreshNeighborTiles(), Trait.ShouldRefreshTile, Card.sourceCard, Card.Thing, CellDetail.things, and Card.trait.

Referenced by Map._AddCard(), and Card.SetPlaceState().

◆ CanBuildRamp()

bool Cell.CanBuildRamp ( int  dir)
inline

Definition at line 1139 of file Cell.cs.

1140 {
1141 if (HasRamp)
1142 {
1143 return blockDir == dir;
1144 }
1145 return true;
1146 }
bool HasRamp
Definition: Cell.cs:837
int blockDir
Definition: Cell.cs:898

References blockDir, and HasRamp.

Referenced by Map.GetRampDir().

◆ CanGrow()

bool Cell.CanGrow ( SourceObj::Row  obj,
VirtualDate  date 
)
inline

Definition at line 1649 of file Cell.cs.

1650 {
1651 GrowSystem.cell = this;
1652 return obj.growth?.CanGrow(date) ?? false;
1653 }
byte obj
Definition: Cell.cs:38

References obj.

Referenced by TraitSeed.TrySprout(), and WidgetDebug.UpdateText().

◆ CanHarvest()

bool Cell.CanHarvest ( )
inline

Definition at line 1660 of file Cell.cs.

1661 {
1662 return growth?.CanHarvest() ?? false;
1663 }
GrowSystem growth
Definition: Cell.cs:225
bool CanHarvest()
Definition: GrowSystem.cs:482

References GrowSystem.CanHarvest(), and growth.

Referenced by Map.GetNearbyResourcePoint(), and TaskHarvest.TryGetAct().

◆ CanMakeStraw()

bool Cell.CanMakeStraw ( )
inline

Definition at line 1670 of file Cell.cs.

1671 {
1672 if (sourceObj.alias == "wheat")
1673 {
1674 return growth.IsLastStage();
1675 }
1676 return false;
1677 }
SourceObj.Row sourceObj
Definition: Cell.cs:1072
bool IsLastStage()
Definition: GrowSystem.cs:101

References growth, GrowSystem.IsLastStage(), and sourceObj.

Referenced by TaskCut.OnProgress(), and TaskCut.OnStart().

◆ CanReapSeed()

bool Cell.CanReapSeed ( )
inline

Definition at line 1665 of file Cell.cs.

1666 {
1667 return growth?.CanReapSeed() ?? false;
1668 }
virtual bool CanReapSeed()
Definition: GrowSystem.cs:491

References GrowSystem.CanReapSeed(), and growth.

Referenced by TaskHarvest.CanProgress(), and TaskHarvest.TryGetAct().

◆ CanSuffocate()

bool Cell.CanSuffocate ( )
inline

Definition at line 1111 of file Cell.cs.

1112 {
1113 if (!IsDeepWater)
1114 {
1115 return false;
1116 }
1117 if (detail != null && detail.things.Count > 0)
1118 {
1119 foreach (Thing thing in detail.things)
1120 {
1121 if (thing.IsInstalled && thing.isFloating)
1122 {
1123 return false;
1124 }
1125 }
1126 }
1127 return true;
1128 }
bool isFloating
Definition: Card.cs:622
bool IsInstalled
Definition: Card.cs:2241
bool IsDeepWater
Definition: Cell.cs:794
Definition: Thing.cs:8

References detail, IsDeepWater, Card.isFloating, Card.IsInstalled, and CellDetail.things.

Referenced by Chara._Move(), Chara.Tick(), and ConSuffocation.Tick().

◆ Equals()

override bool Cell.Equals ( object  obj)
inline

Definition at line 1086 of file Cell.cs.

1087 {
1088 return false;
1089 }

◆ GetBlockName()

string Cell.GetBlockName ( )
inline

Definition at line 1585 of file Cell.cs.

1586 {
1587 return Lang.Parse("blockName", matBlock.GetName(), sourceBlock.GetName());
1588 }
SourceBlock.Row sourceBlock
Definition: Cell.cs:1052
SourceMaterial.Row matBlock
Definition: Cell.cs:1030
Definition: Lang.cs:6
static string Parse(string idLang, string val1, string val2=null, string val3=null, string val4=null, string val5=null)
Definition: Lang.cs:147

References matBlock, Lang.Parse(), and sourceBlock.

Referenced by TaskMine.GetTextSmall(), TaskMine.OnCreateProgress(), LayerInfo.SetBlock(), UICardInfo.SetBlock(), and BlockInfo.WriteNote().

◆ GetBridgeName()

string Cell.GetBridgeName ( )
inline

Definition at line 1595 of file Cell.cs.

1596 {
1597 return Lang.Parse("blockName", matBridge.GetName(), sourceBridge.GetName());
1598 }
SourceMaterial.Row matBridge
Definition: Cell.cs:1034
SourceFloor.Row sourceBridge
Definition: Cell.cs:1056

References matBridge, Lang.Parse(), and sourceBridge.

Referenced by TaskDig.GetTextSmall(), and TaskDig.OnCreateProgress().

◆ GetFloorName()

string Cell.GetFloorName ( )
inline

Definition at line 1590 of file Cell.cs.

1591 {
1592 return Lang.Parse("blockName", matFloor.GetName(), sourceFloor.GetName());
1593 }
SourceFloor.Row sourceFloor
Definition: Cell.cs:1054
SourceMaterial.Row matFloor
Definition: Cell.cs:1032

References matFloor, Lang.Parse(), and sourceFloor.

Referenced by TaskDig.GetTextSmall(), TaskMine.GetTextSmall(), TaskDig.OnCreateProgress(), TaskWater.Run(), LayerInfo.SetFloor(), and UICardInfo.SetFloor().

◆ GetHashCode()

override int Cell.GetHashCode ( )
inline

Definition at line 1096 of file Cell.cs.

1097 {
1098 return index;
1099 }
int index
Definition: Cell.cs:114

References index.

◆ GetLiquidName()

string Cell.GetLiquidName ( )
inline

Definition at line 1644 of file Cell.cs.

1645 {
1646 return Lang.Parse("liquidName", sourceEffect.GetName());
1647 }
SourceCellEffect.Row sourceEffect
Definition: Cell.cs:1070

References Lang.Parse(), and sourceEffect.

Referenced by LayerInfo.SetLiquid(), and UICardInfo.SetLiquid().

◆ GetObjName()

string Cell.GetObjName ( )
inline

Definition at line 1600 of file Cell.cs.

1601 {
1602 PlantData plantData = EClass._map.TryGetPlant(this);
1603 string text = sourceObj.GetName();
1604 if (sourceObj.tag.Contains("mat_name") && matObj.alias != "granite" && (sourceObj.id != 10 || !(matObj.alias == "crystal")))
1605 {
1606 text = "_of2".lang(matObj.GetName(), text);
1607 }
1608 if (plantData != null && plantData.size > 0)
1609 {
1610 text = Lang.GetList("plant_size")[plantData.size - 1] + text;
1611 }
1612 text = text.AddArticle();
1613 if (plantData != null)
1614 {
1615 if (plantData.seed != null)
1616 {
1617 if (!plantData.seed.c_refText.IsEmpty())
1618 {
1619 text = plantData.seed.c_refText;
1620 }
1621 if (plantData.seed.encLV > 0)
1622 {
1623 text = text + "+" + plantData.seed.encLV;
1624 }
1625 }
1626 if (plantData.fert != 0)
1627 {
1628 text += ((plantData.fert > 0) ? "fertilized" : "defertilized").lang();
1629 }
1630 }
1631 if (map.backerObjs.ContainsKey(index))
1632 {
1633 int key = map.backerObjs[index];
1634 SourceBacker.Row row = EClass.sources.backers.map.TryGetValue(key);
1635 if (row != null && EClass.core.config.backer.Show(row))
1636 {
1637 string name = row.Name;
1638 text = ((sourceObj.id == 82) ? "backerRemain".lang(text, name) : "backerTree".lang(text, name));
1639 }
1640 }
1641 return text;
1642 }
string c_refText
Definition: Card.cs:1529
int encLV
Definition: Card.cs:310
SourceMaterial.Row matObj
Definition: Cell.cs:1036
static Map map
Definition: Cell.cs:8
BackerContentConfig backer
Definition: CoreConfig.cs:600
CoreConfig config
Definition: Core.cs:70
Definition: EClass.cs:5
static Core core
Definition: EClass.cs:6
static Map _map
Definition: EClass.cs:18
static SourceManager sources
Definition: EClass.cs:42
static string[] GetList(string id)
Definition: Lang.cs:114
PlantData TryGetPlant(Point p)
Definition: Map.cs:1920
Dictionary< int, int > backerObjs
Definition: Map.cs:67
Thing seed
Definition: PlantData.cs:6
int fert
Definition: PlantData.cs:12
int size
Definition: PlantData.cs:15
SourceBacker backers
string GetName(int id)
Definition: SourceObj.cs:149

References EClass._map, CoreConfig.backer, Map.backerObjs, SourceManager.backers, Card.c_refText, Core.config, EClass.core, Card.encLV, PlantData.fert, Lang.GetList(), SourceObj.GetName(), index, map, matObj, SourceBacker.Row.Name, PlantData.seed, CoreConfig.BackerContentConfig.Show(), PlantData.size, sourceObj, EClass.sources, and Map.TryGetPlant().

Referenced by BaseTaskHarvest.GetTextSmall(), Map.MineObj(), TaskHarvest.OnCreateProgress(), and GrowSystem.PopHarvest().

◆ GetOrCreateDetail()

CellDetail Cell.GetOrCreateDetail ( )
inline

Definition at line 1529 of file Cell.cs.

1530 {
1531 if (detail == null)
1532 {
1534 }
1535 return detail;
1536 }
static CellDetail Spawn()
Definition: CellDetail.cs:25

References detail, and CellDetail.Spawn().

Referenced by AddCard(), Area.AddPoint(), Point.Animate(), DesignationList< T >.OnAdd(), DesignationList< T >.Remove(), and Map.SetFoormark().

◆ GetPoint()

◆ GetSharedPoint()

Point Cell.GetSharedPoint ( )
inline

Definition at line 1106 of file Cell.cs.

1107 {
1108 return Point.shared.Set(x, z);
1109 }
static Point shared
Definition: Point.cs:20
Point Set(int _x, int _z)
Definition: Point.cs:479

References Point.Set(), Point.shared, x, and z.

Referenced by Map.Burn().

◆ GetSurfaceHeight()

float Cell.GetSurfaceHeight ( )
inline

Definition at line 1684 of file Cell.cs.

1685 {
1686 if (detail == null)
1687 {
1688 return 0f;
1689 }
1690 bool isTopWater = IsTopWater;
1691 for (int i = 0; i < detail.things.Count; i++)
1692 {
1693 Thing thing = detail.things[i];
1694 if (!thing.IsInstalled)
1695 {
1696 continue;
1697 }
1698 if (isTopWater)
1699 {
1700 if (thing.isFloating)
1701 {
1702 return thing.Pref.height + 0.1f;
1703 }
1704 }
1705 else if (thing.Pref.Surface)
1706 {
1707 return 0.1f * (float)thing.altitude + thing.Pref.height;
1708 }
1709 }
1710 return 0f;
1711 }
int altitude
Definition: Card.cs:214
bool IsTopWater
Definition: Cell.cs:700
bool Surface
Definition: SourcePref.cs:314
float height
Definition: SourcePref.cs:47
override SourcePref Pref
Definition: Thing.cs:50

References Card.altitude, detail, SourcePref.height, Card.isFloating, Card.IsInstalled, IsTopWater, Thing.Pref, SourcePref.Surface, and CellDetail.things.

Referenced by Chara._Move().

◆ HasObstacle()

bool Cell.HasObstacle ( )
inline

Definition at line 1130 of file Cell.cs.

1131 {
1132 if (!blocked && _block == 0 && obj == 0)
1133 {
1134 return hasDoor;
1135 }
1136 return true;
1137 }
byte _block
Definition: Cell.cs:30
bool hasDoor
Definition: Cell.cs:258

References _block, Algorithms.WeightCell.blocked, hasDoor, and obj.

Referenced by BiomeProfile.Populate().

◆ HasZoneStairs()

bool Cell.HasZoneStairs ( bool  includeLocked = true)
inline

Definition at line 1713 of file Cell.cs.

1714 {
1715 if (detail == null)
1716 {
1717 return false;
1718 }
1719 foreach (Thing thing in detail.things)
1720 {
1721 if (thing.IsInstalled && (thing.trait is TraitStairs || (includeLocked && thing.trait is TraitStairsLocked)))
1722 {
1723 return true;
1724 }
1725 }
1726 return false;
1727 }

References detail, Card.IsInstalled, CellDetail.things, and Card.trait.

Referenced by UIMapPreview._RefreshPoint(), MapBounds.GetRandomSpace(), and ActEffect.GetTeleportPos().

◆ IsPathBlocked()

override bool Cell.IsPathBlocked ( PathManager::MoveType  moveType)
inlinevirtual

Reimplemented from Algorithms.WeightCell.

Definition at line 1729 of file Cell.cs.

1730 {
1731 if (moveType == PathManager.MoveType.Default)
1732 {
1733 return blocked;
1734 }
1735 if (!blocked)
1736 {
1737 if (detail != null)
1738 {
1739 return detail.charas.Count > 0;
1740 }
1741 return false;
1742 }
1743 return true;
1744 }

References Algorithms.WeightCell.blocked, and detail.

◆ Refresh()

void Cell.Refresh ( )
inline

Definition at line 1148 of file Cell.cs.

1149 {
1150 Cell cell2 = ((x > 0) ? cells[x - 1, z] : Void);
1151 Cell cell3 = ((x + 1 < Size) ? cells[x + 1, z] : Void);
1152 Cell cell4 = ((z > 0) ? cells[x, z - 1] : Void);
1153 Cell cell5 = ((z + 1 < Size) ? cells[x, z + 1] : Void);
1154 Cell cell6 = ((x > 0 && z > 0) ? cells[x - 1, z - 1] : Void);
1155 Cell cell7 = ((x + 1 < Size && z > 0) ? cells[x + 1, z - 1] : Void);
1156 Cell cell8 = ((x > 0 && z + 1 < Size) ? cells[x - 1, z + 1] : Void);
1157 Cell cell9 = ((x + 1 < Size && z + 1 < Size) ? cells[x + 1, z + 1] : Void);
1158 Cell cell10 = ((z > 1) ? cells[x, z - 2] : Void);
1159 Cell cell11 = ((x + 2 < Size) ? cells[x + 2, z] : Void);
1160 TileType tileType = sourceBlock.tileType;
1161 TileType tileType2 = sourceFloor.tileType;
1162 MapBounds bounds = map.bounds;
1163 bool flag = _bridge != 0;
1164 outOfBounds = x < bounds.x || z < bounds.z || x > bounds.maxX || z > bounds.maxZ;
1165 isSurrounded4d = cell2.HasFullBlock && cell3.HasFullBlock && cell4.HasFullBlock && cell5.HasFullBlock;
1166 isSurrounded = isSurrounded4d && cell6.HasFullBlock && cell7.HasFullBlock && cell8.HasFullBlock && cell9.HasFullBlock && cell4.bridgeHeight == bridgeHeight && cell3.bridgeHeight == bridgeHeight && cell5.bridgeHeight == bridgeHeight && cell2.bridgeHeight == bridgeHeight;
1168 hasDoor = false;
1169 hasDoorBoat = false;
1170 isDeck = false;
1171 isShoreSand = false;
1172 hasWindow = false;
1173 isCurtainClosed = false;
1174 isSkyFloor = tileType2 != TileType.Sky && (cell3.sourceFloor.tileType == TileType.Sky || cell4.sourceFloor.tileType == TileType.Sky);
1175 openPath = false;
1176 openSight = tileType.IsOpenSight || (cell4.hasWindow && !cell4.isCurtainClosed) || (cell3.hasWindow && !cell3.isCurtainClosed);
1177 blockSight = tileType.IsBlockSight || ((objList[obj].growth != null) ? objList[obj].growth.BlockSight(this) : objList[obj].tileType.IsBlockSight);
1178 blocked = outOfBounds || tileType.IsBlockPass || (tileType2.IsBlockPass && !flag) || ((objList[obj].growth != null) ? objList[obj].growth.BlockPass(this) : objList[obj].tileType.IsBlockPass) || impassable;
1179 isSlopeEdge = height > cell3.height || height > cell4.height;
1180 if (flag && sourceBridge.tileType.ShowPillar)
1181 {
1182 isBridgeEdge = _bridge != cell3._bridge || _bridge != cell4._bridge || bridgeHeight > cell3.bridgeHeight || bridgeHeight > cell4.bridgeHeight || _bridge != cell2._bridge || _bridge != cell5._bridge || bridgeHeight > cell2.bridgeHeight || bridgeHeight > cell5.bridgeHeight;
1183 }
1184 else
1185 {
1186 isBridgeEdge = false;
1187 }
1188 lotShade = false;
1189 if (room == null && !EClass._zone.IsSnowCovered)
1190 {
1191 if ((cell11.room != null && cell3.sourceBlock.tileType.CastShadowSelf) || (cell10.room != null && cell4.sourceBlock.tileType.CastShadowSelf))
1192 {
1193 lotShade = true;
1194 }
1195 else if ((cell11.Front.room != null && cell7.sourceBlock.tileType.CastShadowSelf) || (cell10.Right.room != null && cell7.sourceBlock.tileType.CastShadowSelf) || (cell7.FrontRight.room != null && cell7.Right.sourceBlock.tileType.CastShadowSelf))
1196 {
1197 lotShade = true;
1198 }
1199 else if (cell11.sourceBlock.tileType.CastShadowSelf && cell11.Right.room != null)
1200 {
1201 lotShade = true;
1202 }
1203 }
1204 isShadowed = lotShade || sourceBlock.tileType.CastShadowSelf || cell4.sourceBlock.tileType.CastShadowBack || (!HasRoof && _roofBlock != 0);
1205 castFloorShadow = lotShade || (room == null && sourceBlock.tileType.CastShadowSelf);
1206 byte b = (flag ? bridgeHeight : height);
1207 byte b2 = ((cell4.bridgeHeight == 0) ? cell4.height : cell4.bridgeHeight);
1208 byte b3 = ((cell3.bridgeHeight == 0) ? cell3.height : cell3.bridgeHeight);
1209 byte b4 = ((cell10.bridgeHeight == 0) ? cell10.height : cell10.bridgeHeight);
1210 byte b5 = ((cell11.bridgeHeight == 0) ? cell11.height : cell11.bridgeHeight);
1211 int num = 0;
1212 if (b3 - b > num)
1213 {
1214 num = b3 - b;
1215 }
1216 if (b2 - b > num)
1217 {
1218 num = b2 - b;
1219 }
1220 if (b5 - b - 4 > num)
1221 {
1222 num = b5 - b - 4;
1223 }
1224 if (b4 - b - 4 > num)
1225 {
1226 num = b4 - b - 4;
1227 }
1228 num -= 4;
1229 if (num > 15)
1230 {
1231 num = 15;
1232 }
1233 if (IsTopWater)
1234 {
1235 num /= 3;
1236 }
1237 else if (isShadowed)
1238 {
1239 num /= 2;
1240 }
1241 if (num <= 0)
1242 {
1243 num = 0;
1244 }
1245 shadowMod = (byte)num;
1246 baseWeight = 0;
1247 if (detail != null && detail.things.Count > 0)
1248 {
1249 for (int i = 0; i < detail.things.Count; i++)
1250 {
1251 Thing thing = detail.things[i];
1252 if (!thing.IsInstalled)
1253 {
1254 continue;
1255 }
1256 if (thing.trait.WeightMod > baseWeight)
1257 {
1258 baseWeight = thing.trait.WeightMod;
1259 }
1260 if (thing.isHidden)
1261 {
1262 continue;
1263 }
1264 if (thing.trait.IsFloating)
1265 {
1266 isFloating = true;
1267 if (IsFloorWater)
1268 {
1269 blocked = true;
1270 }
1271 else
1272 {
1273 isDeck = true;
1274 }
1275 }
1276 else
1277 {
1278 if (thing.trait.IsOpenPath)
1279 {
1280 blocked = false;
1281 hasDoorBoat = true;
1282 openPath = true;
1283 openSight = true;
1284 }
1285 if (thing.trait.IsBlockPath)
1286 {
1287 blocked = true;
1288 }
1289 }
1290 if (thing.trait.IsOpenSight)
1291 {
1292 openSight = true;
1293 }
1294 if (thing.trait is TraitDoor)
1295 {
1296 blocked = false;
1297 hasDoor = true;
1298 blockSight = true;
1299 }
1300 else if (thing.trait.IsBlockSight)
1301 {
1302 blockSight = true;
1303 }
1304 Trait trait = thing.trait;
1305 if (!(trait is TraitWindow))
1306 {
1307 if (trait is TraitCurtain)
1308 {
1309 isCurtainClosed = thing.isOn;
1310 }
1311 }
1312 else
1313 {
1314 hasWindow = true;
1315 }
1316 }
1317 }
1318 minHeight = (byte)(10 + b + ((IsTopWater && !isFloating) ? sourceFloor.tileType.FloorAltitude : 0));
1319 topHeight = (byte)(minHeight + tileType.slopeHeight);
1320 weights[0] = (byte)((Mathf.Abs(cell4.minHeight - topHeight) <= 8 || Mathf.Abs(cell4.topHeight - minHeight) <= 8) ? 1u : 0u);
1321 weights[1] = (byte)((Mathf.Abs(cell3.minHeight - topHeight) <= 8 || Mathf.Abs(cell3.topHeight - minHeight) <= 8) ? 1u : 0u);
1322 weights[2] = (byte)((Mathf.Abs(cell5.minHeight - topHeight) <= 8 || Mathf.Abs(cell5.topHeight - minHeight) <= 8) ? 1u : 0u);
1323 weights[3] = (byte)((Mathf.Abs(cell2.minHeight - topHeight) <= 8 || Mathf.Abs(cell2.topHeight - minHeight) <= 8) ? 1u : 0u);
1324 if (IsDeepWater)
1325 {
1326 baseWeight += 100;
1327 }
1328 ignoreObjShadow = (b2 > b && b2 - b > 6) || (b3 > b && b3 - b > 6);
1329 isWallEdge = !blocked && cell3.sourceBlock.tileType.IsWallOrFence && cell3.blockDir != 1 && cell4.sourceBlock.tileType.IsWallOrFence && cell4.blockDir != 0;
1330 if (isWallEdge)
1331 {
1332 blockSight = cell3.sourceBlock.tileType.IsBlockSight && cell4.sourceBlock.tileType.IsBlockSight;
1333 blocked = true;
1334 blockSight = true;
1335 }
1336 shadow = 0;
1337 if (!HasBlock)
1338 {
1339 if (cell2.isSeen && cell2.CastAmbientShadow && !cell2.hasDoor && bridgeHeight == cell2.bridgeHeight && !sourceFloor.ignoreTransition && (!cell2.sourceBlock.tileType.IsWallOrFence || cell2.blockDir != 0))
1340 {
1341 shadow++;
1342 }
1343 if (cell5.isSeen && cell5.CastAmbientShadow && !cell5.hasDoor && bridgeHeight == cell5.bridgeHeight && !sourceFloor.ignoreTransition && (!cell5.sourceBlock.tileType.IsWallOrFence || cell5.blockDir != 1))
1344 {
1345 shadow += 2;
1346 }
1347 }
1348 else
1349 {
1350 if (isFloating && (room != null || cell4.room != null || cell3.room != null || cell7.room != null))
1351 {
1352 isFloating = false;
1353 }
1354 if (sourceBlock.tileType.IsFence && !hasDoor && (blockDir != 0 || cell5.topHeight >= b - 3) && (blockDir != 1 || cell2.topHeight >= b - 3))
1355 {
1356 shadow = (byte)(blockDir + 4);
1357 }
1358 }
1359 bool isFloorWater = IsFloorWater;
1360 if (isFloorWater)
1361 {
1362 shore = (byte)((((!cell5.IsNotWaterEdge && z != Size - 1 && height == cell5.height) ? 1 : 0) + ((!cell3.IsNotWaterEdge && x != Size - 1 && height == cell3.height) ? 2 : 0) + ((!cell4.IsNotWaterEdge && z != 0 && height == cell4.height) ? 4 : 0) + ((!cell2.IsNotWaterEdge && x != 0 && height == cell2.height) ? 8 : 0)) * 12);
1363 isShoreSand = cell5.sourceFloor.isBeach || cell3.sourceFloor.isBeach || cell4.sourceFloor.isBeach || cell2.sourceFloor.isBeach;
1364 if (shore != 0)
1365 {
1366 shore += (byte)(isShoreSand ? 2 : 3);
1367 }
1368 }
1369 else
1370 {
1371 shore = 0;
1372 }
1373 if (sourceFloor.autotile > 0)
1374 {
1375 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));
1376 }
1377 else
1378 {
1379 autotile = 0;
1380 }
1381 if (_bridge != 0 && sourceBridge.autotile > 0)
1382 {
1383 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));
1384 }
1385 else
1386 {
1387 autotileBridge = 0;
1388 }
1389 if (obj != 0 && sourceObj.autoTile)
1390 {
1391 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));
1392 }
1393 else
1394 {
1395 autotileObj = 0;
1396 }
1397 if (openSight)
1398 {
1399 blockSight = false;
1400 }
1401 if (openPath)
1402 {
1403 blocked = false;
1404 }
1405 bool IsAutoTileEdge(Cell cell)
1406 {
1407 if (cell.sourceFloor.autotilePriority <= sourceFloor.autotilePriority && (!sourceFloor.isBeach || !cell.sourceFloor.isBeach) && (cell._floor != _floor || cell._floorMat != _floorMat))
1408 {
1409 return true;
1410 }
1411 if (!isFloorWater)
1412 {
1413 return height != cell.height;
1414 }
1415 return false;
1416 }
1417 bool IsBridgeAutoTileEdge(Cell cell)
1418 {
1419 if (cell.sourceBridge.autotilePriority <= sourceBridge.autotilePriority && (cell._bridge != _bridge || cell._bridgeMat != _bridgeMat))
1420 {
1421 return true;
1422 }
1423 return bridgeHeight != cell.bridgeHeight;
1424 }
1425 bool IsObjAutoTileEdge(Cell cell)
1426 {
1427 if (cell.obj != obj && (obj != 31 || (cell.obj != 97 && cell.obj != 98)))
1428 {
1429 return true;
1430 }
1431 return topHeight != cell.topHeight;
1432 }
1433 }
bool isHidden
Definition: Card.cs:502
bool isOn
Definition: Card.cs:514
Definition: Cell.cs:7
static Cell[,] cells
Definition: Cell.cs:24
Room room
Definition: Cell.cs:102
bool lotShade
Definition: Cell.cs:534
bool castFloorShadow
Definition: Cell.cs:522
byte autotile
Definition: Cell.cs:62
bool HasBlock
Definition: Cell.cs:643
byte shadow
Definition: Cell.cs:70
byte _bridge
Definition: Cell.cs:46
bool isDeck
Definition: Cell.cs:510
byte shadowMod
Definition: Cell.cs:76
byte _floor
Definition: Cell.cs:34
bool hasWindow
Definition: Cell.cs:570
bool hasDoorBoat
Definition: Cell.cs:498
bool isFloating
Definition: Cell.cs:474
Cell Front
Definition: Cell.cs:129
bool IsFloorWater
Definition: Cell.cs:727
byte _floorMat
Definition: Cell.cs:36
static List< SourceObj.Row > objList
Definition: Cell.cs:20
bool blockSight
Definition: Cell.cs:318
static int Size
Definition: Cell.cs:22
byte shore
Definition: Cell.cs:68
byte topHeight
Definition: Cell.cs:78
byte minHeight
Definition: Cell.cs:80
byte _roofBlock
Definition: Cell.cs:50
byte _bridgeMat
Definition: Cell.cs:48
bool isCurtainClosed
Definition: Cell.cs:582
bool CastAmbientShadow
Definition: Cell.cs:865
byte height
Definition: Cell.cs:72
byte autotileObj
Definition: Cell.cs:66
bool isShadowed
Definition: Cell.cs:246
byte autotileBridge
Definition: Cell.cs:64
bool HasRoof
Definition: Cell.cs:648
bool isSkyFloor
Definition: Cell.cs:594
static bool openPath
Definition: Cell.cs:110
bool isSeen
Definition: Cell.cs:282
bool isSlopeEdge
Definition: Cell.cs:354
bool isShoreSand
Definition: Cell.cs:546
static bool openSight
Definition: Cell.cs:108
bool isForceFloat
Definition: Cell.cs:306
bool isSurrounded
Definition: Cell.cs:234
bool isWallEdge
Definition: Cell.cs:426
bool outOfBounds
Definition: Cell.cs:414
bool impassable
Definition: Cell.cs:402
static Cell Void
Definition: Cell.cs:10
Cell Right
Definition: Cell.cs:141
bool ignoreObjShadow
Definition: Cell.cs:378
byte bridgeHeight
Definition: Cell.cs:74
bool isBridgeEdge
Definition: Cell.cs:366
bool HasFullBlock
Definition: Cell.cs:817
bool IsNotWaterEdge
Definition: Cell.cs:688
Cell FrontRight
Definition: Cell.cs:177
bool isSurrounded4d
Definition: Cell.cs:294
static Zone _zone
Definition: EClass.cs:20
virtual bool BlockSight(Cell cell)
Definition: GrowSystem.cs:111
int maxZ
Definition: MapBounds.cs:17
MapBounds bounds
Definition: Map.cs:52
virtual bool IsSnowCovered
Definition: Spatial.cs:531
static TileTypeSky Sky
Definition: TileType.cs:67
virtual byte slopeHeight
Definition: TileType.cs:223
Definition: Trait.cs:7
virtual bool IsBlockPath
Definition: Trait.cs:52
virtual bool IsBlockSight
Definition: Trait.cs:54
virtual bool IsOpenPath
Definition: Trait.cs:60
virtual bool IsFloating
Definition: Trait.cs:62
virtual bool IsOpenSight
Definition: Trait.cs:58
virtual byte WeightMod
Definition: Trait.cs:42

References _bridge, _bridgeMat, _floor, _floorMat, _roofBlock, EClass._zone, autotile, autotileBridge, autotileObj, Algorithms.WeightCell.baseWeight, blockDir, Algorithms.WeightCell.blocked, blockSight, GrowSystem.BlockSight(), Map.bounds, bridgeHeight, CastAmbientShadow, castFloorShadow, cells, detail, Front, FrontRight, growth, HasBlock, hasDoor, hasDoorBoat, HasFullBlock, HasRoof, hasWindow, height, ignoreObjShadow, impassable, Trait.IsBlockPath, Trait.IsBlockSight, isBridgeEdge, isCurtainClosed, isDeck, IsDeepWater, isFloating, Trait.IsFloating, IsFloorWater, isForceFloat, Card.isHidden, Card.IsInstalled, IsNotWaterEdge, Card.isOn, Trait.IsOpenPath, Trait.IsOpenSight, isSeen, isShadowed, isShoreSand, isSkyFloor, isSlopeEdge, Spatial.IsSnowCovered, isSurrounded, isSurrounded4d, IsTopWater, isWallEdge, lotShade, map, MapBounds.maxZ, minHeight, obj, objList, openPath, openSight, outOfBounds, Right, room, shadow, shadowMod, shore, Size, TileType.Sky, TileType.slopeHeight, sourceBlock, sourceBridge, sourceFloor, sourceObj, CellDetail.things, topHeight, Card.trait, Void, Trait.WeightMod, Algorithms.WeightCell.weights, x, and z.

Referenced by GrowSystem.Grow(), Map.RefreshAllTiles(), Map.RefreshNeighborTiles(), Map.RefreshSingleTile(), and Card.SetHidden().

◆ RemoveCard()

void Cell.RemoveCard ( Card  c)
inline

Definition at line 1562 of file Cell.cs.

1563 {
1564 if (c.isChara)
1565 {
1566 if (detail != null)
1567 {
1568 detail.charas.Remove(c.Chara);
1569 }
1570 }
1571 else
1572 {
1573 if (detail != null)
1574 {
1575 detail.things.Remove(c.Thing);
1576 }
1578 {
1580 }
1581 }
1583 }
void TryDespawnDetail()
Definition: Cell.cs:1538

References Card.Chara, CellDetail.charas, detail, GetPoint(), Card.isChara, RenderRow.multisize, Point.RefreshNeighborTiles(), Trait.ShouldRefreshTile, Card.sourceCard, Card.Thing, CellDetail.things, Card.trait, and TryDespawnDetail().

Referenced by Map._RemoveCard(), and Card.SetPlaceState().

◆ Reset()

void Cell.Reset ( )
inline

Definition at line 1522 of file Cell.cs.

1523 {
1524 _block = (_blockMat = (_floor = (_floorMat = (obj = (decal = (objVal = (objMat = 0)))))));
1525 bits.Bits = 0u;
1526 bits2.Bits = 0u;
1527 }
byte objMat
Definition: Cell.cs:42
byte decal
Definition: Cell.cs:44
byte objVal
Definition: Cell.cs:40
byte _blockMat
Definition: Cell.cs:32

References _block, _blockMat, _floor, _floorMat, decal, obj, objMat, and objVal.

Referenced by Map.Reset().

◆ RotateAll()

void Cell.RotateAll ( )
inline

Definition at line 1489 of file Cell.cs.

1490 {
1491 bool flag = EInput.isShiftDown || Input.GetMouseButton(1);
1493 if (mouseTarget.card != null)
1494 {
1495 mouseTarget.card.Rotate(flag);
1496 return;
1497 }
1498 if (detail == null || detail.things.Count == 0)
1499 {
1500 if (HasBlock)
1501 {
1502 if (sourceBlock.tileType.CanRotate(buildMode: false))
1503 {
1504 RotateBlock((!flag) ? 1 : (-1));
1505 }
1506 }
1507 else if (HasObj)
1508 {
1509 if (sourceObj.tileType.CanRotate(buildMode: false))
1510 {
1511 RotateObj(flag, sourceObj.tileType.IsUseBlockDir);
1512 }
1513 }
1514 else if (HasFloor)
1515 {
1516 RotateFloor((!flag) ? 1 : (-1));
1517 }
1518 }
1520 }
virtual void Rotate(bool reverse=false)
Definition: Card.cs:5479
bool HasFloor
Definition: Cell.cs:645
void RotateBlock(int a)
Definition: Cell.cs:1435
bool HasObj
Definition: Cell.cs:641
void RotateObj(bool reverse=false, bool useBlockDir=false)
Definition: Cell.cs:1467
void RotateFloor(int a)
Definition: Cell.cs:1452
Definition: Core.cs:14
static new Core Instance
Definition: Core.cs:15
Scene scene
Definition: Core.cs:65
PointTarget mouseTarget
Definition: Scene.cs:129

References PointTarget.card, detail, GetPoint(), HasBlock, HasFloor, HasObj, Core.Instance, Scene.mouseTarget, Point.RefreshNeighborTiles(), Card.Rotate(), RotateBlock(), RotateFloor(), RotateObj(), Core.scene, sourceBlock, sourceObj, and CellDetail.things.

Referenced by ActionMode.RotateUnderMouse().

◆ RotateBlock()

void Cell.RotateBlock ( int  a)
inline

Definition at line 1435 of file Cell.cs.

1436 {
1437 int num = blockDir;
1438 int num2 = (sourceBlock.tileType.IsWallOrFence ? 3 : sourceBlock._tiles.Length);
1439 num += a;
1440 if (num < 0)
1441 {
1442 num = num2 - 1;
1443 }
1444 if (num >= num2)
1445 {
1446 num = 0;
1448 }
1449 blockDir = num;
1450 }
bool crossWall
Definition: Cell.cs:630

References blockDir, crossWall, and sourceBlock.

Referenced by TaskBuild.OnProgressComplete(), and RotateAll().

◆ RotateFloor()

void Cell.RotateFloor ( int  a)
inline

Definition at line 1452 of file Cell.cs.

1453 {
1454 int num = floorDir;
1455 num += a;
1456 if (num < 0)
1457 {
1458 num = sourceFloor._tiles.Length - 1;
1459 }
1460 if (num >= sourceFloor._tiles.Length)
1461 {
1462 num = 0;
1463 }
1464 floorDir = num;
1465 }
int floorDir
Definition: Cell.cs:922

References floorDir, and sourceFloor.

Referenced by RotateAll().

◆ RotateObj()

void Cell.RotateObj ( bool  reverse = false,
bool  useBlockDir = false 
)
inline

Definition at line 1467 of file Cell.cs.

1468 {
1469 int num = (useBlockDir ? blockDir : objDir);
1470 num = ((!reverse) ? (num + 1) : (num - 1));
1471 if (num < 0)
1472 {
1473 num = sourceObj._tiles.Length - 1;
1474 }
1475 if (num >= sourceObj._tiles.Length)
1476 {
1477 num = 0;
1478 }
1479 if (useBlockDir)
1480 {
1481 blockDir = num;
1482 }
1483 else
1484 {
1485 objDir = num;
1486 }
1487 }
int objDir
Definition: Cell.cs:910

References blockDir, objDir, and sourceObj.

Referenced by RotateAll().

◆ ToString()

override string Cell.ToString ( )
inline

Definition at line 1091 of file Cell.cs.

1092 {
1093 return "Cell(" + x + "," + z + " " + matBlock?.ToString() + "/" + matFloor?.ToString() + "/" + _block + ")";
1094 }

References _block, matBlock, matFloor, x, and z.

◆ TryDespawnDetail()

void Cell.TryDespawnDetail ( )
inline

Definition at line 1538 of file Cell.cs.

1539 {
1540 if (detail != null && detail.TryDespawn())
1541 {
1542 detail = null;
1543 }
1544 }
bool TryDespawn()
Definition: CellDetail.cs:35

References detail, and CellDetail.TryDespawn().

Referenced by GameDate.AdvanceMin(), Area.OnRemove(), DesignationList< T >.Remove(), RemoveCard(), Area.RemovePoint(), and TransAnime.Update().

◆ TryGetPlant()

PlantData Cell.TryGetPlant ( )
inline

Definition at line 1679 of file Cell.cs.

1680 {
1681 return EClass._map.TryGetPlant(this);
1682 }

References EClass._map, and Map.TryGetPlant().

◆ TryGrow()

void Cell.TryGrow ( VirtualDate  date = null)
inline

Definition at line 1655 of file Cell.cs.

1656 {
1657 growth?.TryGrow(date);
1658 }
void TryGrow(VirtualDate date)
Definition: GrowSystem.cs:288

References growth, and GrowSystem.TryGrow().

Member Data Documentation

◆ _block

◆ _blockMat

byte Cell._blockMat

Definition at line 32 of file Cell.cs.

Referenced by PartialMap.Apply(), Map.MineRamp(), Reset(), and Map.Save().

◆ _bridge

◆ _bridgeMat

byte Cell._bridgeMat

Definition at line 48 of file Cell.cs.

Referenced by PartialMap.Apply(), Map.Load(), TaskPourWater.OnCreateProgress(), Refresh(), and Map.Save().

◆ _dirs

byte Cell._dirs

Definition at line 28 of file Cell.cs.

Referenced by PartialMap.Apply(), and Map.Save().

◆ _floor

byte Cell._floor

◆ _floorMat

byte Cell._floorMat

Definition at line 36 of file Cell.cs.

Referenced by PartialMap.Apply(), TaskPourWater.OnCreateProgress(), Refresh(), Reset(), and Map.Save().

◆ _roofBlock

byte Cell._roofBlock

◆ _roofBlockDir

byte Cell._roofBlockDir

Definition at line 54 of file Cell.cs.

Referenced by BaseTileMap.DrawTile(), TaskBuild.OnProgressComplete(), and Map.Save().

◆ _roofBlockMat

byte Cell._roofBlockMat

Definition at line 52 of file Cell.cs.

Referenced by PartialMap.Apply(), BaseTileMap.DrawTile(), and Map.Save().

◆ autotile

byte Cell.autotile

Definition at line 62 of file Cell.cs.

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ autotileBridge

byte Cell.autotileBridge

Definition at line 64 of file Cell.cs.

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ autotileObj

byte Cell.autotileObj

Definition at line 66 of file Cell.cs.

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ bits

BitArray32 Cell.bits

Definition at line 98 of file Cell.cs.

◆ bits2

BitArray32 Cell.bits2

Definition at line 100 of file Cell.cs.

◆ blockList

List<SourceBlock.Row> Cell.blockList
static

Definition at line 14 of file Cell.cs.

Referenced by BaseTileMap.DrawTile().

◆ bridgeHeight

◆ bridgePillar

byte Cell.bridgePillar

Definition at line 82 of file Cell.cs.

Referenced by PartialMap.Apply(), RecipeBridgePillar.Build(), BaseTileMap.DrawTile(), and Map.Save().

◆ cells

Cell [,] Cell.cells
static

Definition at line 24 of file Cell.cs.

Referenced by Crawler.Crawl(), and Refresh().

◆ critter

Critter Cell.critter

Definition at line 96 of file Cell.cs.

Referenced by BaseTileMap.DrawTile().

◆ decal

◆ detail

◆ DIV_LIQUID

const int Cell.DIV_LIQUID = 10
static

Definition at line 106 of file Cell.cs.

◆ DivAutotile

const int Cell.DivAutotile = 12
static

Definition at line 26 of file Cell.cs.

◆ DivStage

const int Cell.DivStage = 30
static

Definition at line 112 of file Cell.cs.

◆ effect

◆ effectList

List<SourceCellEffect.Row> Cell.effectList
static

Definition at line 18 of file Cell.cs.

◆ floorList

List<SourceFloor.Row> Cell.floorList
static

Definition at line 16 of file Cell.cs.

◆ height

◆ highlight

byte Cell.highlight

Definition at line 84 of file Cell.cs.

Referenced by BaseTileMap.DrawTile().

◆ light

byte Cell.light

◆ lightB

ushort Cell.lightB

◆ lightG

ushort Cell.lightG

◆ lightR

ushort Cell.lightR

◆ map

Map Cell.map
static

Definition at line 8 of file Cell.cs.

Referenced by GetObjName(), and Refresh().

◆ matList

List<SourceMaterial.Row> Cell.matList
static

Definition at line 12 of file Cell.cs.

Referenced by BaseTileMap.DrawTile().

◆ minHeight

byte Cell.minHeight

Definition at line 80 of file Cell.cs.

Referenced by Point.IsBlockByHeight(), and Refresh().

◆ obj

◆ objList

List<SourceObj.Row> Cell.objList
static

Definition at line 20 of file Cell.cs.

Referenced by Refresh().

◆ objMat

byte Cell.objMat

Definition at line 42 of file Cell.cs.

Referenced by PartialMap.Apply(), Reset(), and Map.Save().

◆ objVal

byte Cell.objVal

Definition at line 40 of file Cell.cs.

Referenced by PartialMap.Apply(), GrowSystem.OnReachNextStage(), Reset(), and Map.Save().

◆ openPath

bool Cell.openPath
staticprivate

Definition at line 110 of file Cell.cs.

Referenced by Refresh().

◆ openSight

bool Cell.openSight
staticprivate

Definition at line 108 of file Cell.cs.

Referenced by Refresh().

◆ pcSync

bool Cell.pcSync

Definition at line 104 of file Cell.cs.

Referenced by Player.CanSee(), and BaseTileMap.DrawTile().

◆ room

◆ shadow

byte Cell.shadow

Definition at line 70 of file Cell.cs.

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ shadowMod

byte Cell.shadowMod

Definition at line 76 of file Cell.cs.

Referenced by Refresh().

◆ shore

byte Cell.shore

Definition at line 68 of file Cell.cs.

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ Size

int Cell.Size
static

Definition at line 22 of file Cell.cs.

Referenced by Refresh().

◆ topHeight

byte Cell.topHeight

Definition at line 78 of file Cell.cs.

Referenced by Chara._Move(), Point.IsBlockByHeight(), and Refresh().

◆ Void

Cell Cell.Void = new Cell()
static

Definition at line 10 of file Cell.cs.

Referenced by Map.QuickRefreshTile(), and Refresh().

◆ x

◆ z

Property Documentation

◆ Back

◆ BackLeft

Cell Cell.BackLeft
get

Definition at line 212 of file Cell.cs.

213 {
214 get
215 {
216 if (x <= 0 || z + 1 >= Size)
217 {
218 return Void;
219 }
220 return cells[x - 1, z + 1];
221 }
222 }

Referenced by BaseTileMap.DrawTile(), and Map.TryAddRoom().

◆ BackRight

Cell Cell.BackRight
get

Definition at line 200 of file Cell.cs.

201 {
202 get
203 {
204 if (x + 1 >= Size || z + 1 >= Size)
205 {
206 return Void;
207 }
208 return cells[x + 1, z + 1];
209 }
210 }

Referenced by BaseTileMap.DrawTile().

◆ biome

BiomeProfile Cell.biome
get

Definition at line 1074 of file Cell.cs.

1075 {
1076 get
1077 {
1078 if (!(sourceFloor.biome != null))
1079 {
1080 return EClass._zone.biome;
1081 }
1082 return sourceFloor.biome;
1083 }
1084 }
BiomeProfile biome
Definition: Zone.cs:126

Referenced by Crawler.Crawl(), and MapGen.Populate().

◆ blockDir

◆ blockSight

bool Cell.blockSight
getset

Definition at line 317 of file Cell.cs.

318 {
319 get
320 {
321 return bits[9];
322 }
323 set
324 {
325 bits[9] = value;
326 }
327 }
BitArray32 bits
Definition: Cell.cs:98

Referenced by Los.IsBlocked(), Refresh(), and Fov.TraceLine().

◆ CanGrowWeed

bool Cell.CanGrowWeed
get

Definition at line 741 of file Cell.cs.

742 {
743 get
744 {
745 if (obj == 0 && FirstThing == null && !HasBlock && !HasRoof)
746 {
747 if (!IsFarmField)
748 {
749 if (_bridge != 0)
750 {
751 if (matBridge.category == "grass")
752 {
753 return sourceBridge.tag.Contains("weed");
754 }
755 return false;
756 }
757 if (matFloor.category == "grass")
758 {
759 return sourceFloor.tag.Contains("weed");
760 }
761 return false;
762 }
763 return true;
764 }
765 return false;
766 }
767 }
bool IsFarmField
Definition: Cell.cs:730
Thing FirstThing
Definition: Cell.cs:962

Referenced by GrowSystem.OnExceedLastStage().

◆ CastAmbientShadow

bool Cell.CastAmbientShadow
get

Definition at line 865 of file Cell.cs.

Referenced by Refresh().

◆ castFloorShadow

bool Cell.castFloorShadow
getset

Definition at line 521 of file Cell.cs.

522 {
523 get
524 {
525 return bits[28];
526 }
527 set
528 {
529 bits[28] = value;
530 }
531 }

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ CastShadow

bool Cell.CastShadow
get

Definition at line 863 of file Cell.cs.

◆ Charas

List<Chara> Cell.Charas
get

Definition at line 988 of file Cell.cs.

◆ crossWall

bool Cell.crossWall
getset

Definition at line 629 of file Cell.cs.

630 {
631 get
632 {
633 return bits2[5];
634 }
635 set
636 {
637 bits2[5] = value;
638 }
639 }
BitArray32 bits2
Definition: Cell.cs:100

Referenced by RotateBlock(), and Map.Save().

◆ fireAmount

int Cell.fireAmount
get

Definition at line 957 of file Cell.cs.

Referenced by LogicalFire.Update().

◆ FirstThing

Thing Cell.FirstThing
get

Definition at line 961 of file Cell.cs.

962 {
963 get
964 {
965 CellDetail cellDetail = detail;
966 if (cellDetail == null || cellDetail.things.Count <= 0)
967 {
968 return null;
969 }
970 return detail.things[0];
971 }
972 }

Referenced by TraitDoor.TryOpen().

◆ floorDir

int Cell.floorDir
getset

Definition at line 921 of file Cell.cs.

922 {
923 get
924 {
925 return _dirs / 32;
926 }
927 set
928 {
929 _dirs = (byte)(_dirs - floorDir * 32 + value * 32);
930 }
931 }

Referenced by PartialMap.Apply(), BaseTileMap.DrawTile(), Recipe.HasSameTile(), TaskBuild.OnProgressComplete(), and RotateFloor().

◆ Front

◆ FrontLeft

Cell Cell.FrontLeft
get

Definition at line 188 of file Cell.cs.

189 {
190 get
191 {
192 if (x <= 0 || z <= 0)
193 {
194 return Void;
195 }
196 return cells[x - 1, z - 1];
197 }
198 }

Referenced by BaseTileMap.DrawTile().

◆ FrontRight

Cell Cell.FrontRight
get

Definition at line 176 of file Cell.cs.

177 {
178 get
179 {
180 if (x + 1 >= Size || z <= 0)
181 {
182 return Void;
183 }
184 return cells[x + 1, z - 1];
185 }
186 }

Referenced by BaseTileMap.DrawRoof(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), Refresh(), and Map.TryAddRoom().

◆ fullWall

bool Cell.fullWall
getset

Definition at line 461 of file Cell.cs.

462 {
463 get
464 {
465 return bits[23];
466 }
467 set
468 {
469 bits[23] = value;
470 }
471 }

Referenced by BaseTileMap.DrawTile().

◆ gatherCount

int Cell.gatherCount
getset

Definition at line 990 of file Cell.cs.

991 {
992 get
993 {
994 if (!map.gatherCounts.ContainsKey(index))
995 {
996 return 0;
997 }
998 return map.gatherCounts[index];
999 }
1000 set
1001 {
1002 if (value == 0)
1003 {
1004 if (map.gatherCounts.ContainsKey(index))
1005 {
1006 map.gatherCounts.Remove(index);
1007 }
1008 }
1009 else
1010 {
1011 map.gatherCounts[index] = value;
1012 }
1013 }
1014 }
Dictionary< int, int > gatherCounts
Definition: Map.cs:61

◆ growth

◆ HasBlock

◆ HasBlockOrRamp

bool Cell.HasBlockOrRamp
get

Definition at line 859 of file Cell.cs.

◆ HasBridge

◆ hasDoor

◆ hasDoorBoat

bool Cell.hasDoorBoat
getset

Definition at line 497 of file Cell.cs.

498 {
499 get
500 {
501 return bits[26];
502 }
503 set
504 {
505 bits[26] = value;
506 }
507 }

Referenced by Chara._Move(), and Refresh().

◆ HasFence

bool Cell.HasFence
get

Definition at line 835 of file Cell.cs.

◆ HasFire

bool Cell.HasFire
get

Definition at line 675 of file Cell.cs.

676 {
677 get
678 {
679 if (effect != null)
680 {
681 return effect.IsFire;
682 }
683 return false;
684 }
685 }
bool IsFire
Definition: CellEffect.cs:135
CellEffect effect
Definition: Cell.cs:94

Referenced by RecipeCard.Craft(), GameUpdater.SurfaceUpdater.FixedUpdate(), TaskWater.GetText(), Point.ModFire(), AI_Idle.Run(), TaskWater.Run(), TaskWater.ShouldWater(), and LogicalFire.Transfer().

◆ HasFloodBlock

bool Cell.HasFloodBlock
get

Definition at line 1016 of file Cell.cs.

1017 {
1018 get
1019 {
1020 if (!sourceBlock.tileType.IsFloodBlock)
1021 {
1022 return hasDoor;
1023 }
1024 return true;
1025 }
1026 }

Referenced by BaseTileMap.DrawTile(), Map.SetBlock(), and Map.TryAddRoom().

◆ HasFloor

bool Cell.HasFloor
get

Definition at line 645 of file Cell.cs.

Referenced by Trait.ListPoints(), and RotateAll().

◆ HasFloorOrBlock

bool Cell.HasFloorOrBlock
get

Definition at line 659 of file Cell.cs.

660 {
661 get
662 {
663 if (_block == 0)
664 {
665 return _floor != 0;
666 }
667 return true;
668 }
669 }

◆ HasFullBlock

◆ HasFullBlockOrWallOrFence

bool Cell.HasFullBlockOrWallOrFence
get

Definition at line 819 of file Cell.cs.

820 {
821 get
822 {
823 if (!HasFullBlock)
824 {
825 return HasWallOrFence;
826 }
827 return true;
828 }
829 }
bool HasWallOrFence
Definition: Cell.cs:831

Referenced by TileTypeVine.GetDesiredDir(), TraitDoor.IsOpen(), TraitDoor.IsValid(), and Room.Refresh().

◆ HasHalfBlock

bool Cell.HasHalfBlock
get

Definition at line 857 of file Cell.cs.

◆ HasLadder

bool Cell.HasLadder
get

Definition at line 839 of file Cell.cs.

Referenced by AI_Goto.TryGoTo().

◆ HasLiquid

◆ HasObj

◆ HasRamp

◆ HasRampOrLadder

bool Cell.HasRampOrLadder
get

Definition at line 841 of file Cell.cs.

842 {
843 get
844 {
845 if (!HasRamp)
846 {
847 return HasLadder;
848 }
849 return true;
850 }
851 }
bool HasLadder
Definition: Cell.cs:839

◆ HasRoof

bool Cell.HasRoof
get

Definition at line 647 of file Cell.cs.

648 {
649 get
650 {
651 if (room != null)
652 {
653 return room.lot.idRoofStyle != 0;
654 }
655 return false;
656 }
657 }

Referenced by GrowSystem.CanGrow(), CardRenderer.Draw(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), GameUpdater.SurfaceUpdater.FixedUpdate(), Zone.GetSpawnPos(), TraitGenerator.OnSimulateHour(), Zone.RainWater(), Refresh(), Trait.TryToggle(), and GameUpdater.Update100ms().

◆ HasSlope

bool Cell.HasSlope
get

Definition at line 853 of file Cell.cs.

Referenced by TileTypeRoof.HitTest().

◆ HasStairs

bool Cell.HasStairs
get

Definition at line 855 of file Cell.cs.

Referenced by Map.GetDependedRamp().

◆ HasWall

bool Cell.HasWall
get

◆ HasWallOrFence

bool Cell.HasWallOrFence
get

◆ hasWindow

bool Cell.hasWindow
getset

Definition at line 569 of file Cell.cs.

570 {
571 get
572 {
573 return bits2[0];
574 }
575 set
576 {
577 bits2[0] = value;
578 }
579 }

Referenced by Refresh().

◆ ignoreObjShadow

bool Cell.ignoreObjShadow
getset

Definition at line 377 of file Cell.cs.

378 {
379 get
380 {
381 return bits[14];
382 }
383 set
384 {
385 bits[14] = value;
386 }
387 }

Referenced by CardRenderer.Draw(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), GrowSystem.OnRenderTileMap(), and Refresh().

◆ impassable

bool Cell.impassable
getset

Definition at line 401 of file Cell.cs.

402 {
403 get
404 {
405 return bits[16];
406 }
407 set
408 {
409 bits[16] = value;
410 }
411 }

Referenced by MapGenRegion.OnGenerateTerrain(), Refresh(), and Map.Save().

◆ index

int Cell.index
get

◆ Installed

Thing Cell.Installed
get

Definition at line 974 of file Cell.cs.

975 {
976 get
977 {
978 if (detail == null || detail.things.Count <= 0 || !detail.things[0].IsInstalled)
979 {
980 return null;
981 }
982 return detail.things[0];
983 }
984 }

Referenced by Crawler.Crawl(), GenBounds.IsEmpty(), and GenBounds.ListEmptyPoint().

◆ IsBlocked

bool Cell.IsBlocked
get

Definition at line 895 of file Cell.cs.

Referenced by RecipeCard.Build().

◆ isBridgeEdge

bool Cell.isBridgeEdge
getset

Definition at line 365 of file Cell.cs.

366 {
367 get
368 {
369 return bits[13];
370 }
371 set
372 {
373 bits[13] = value;
374 }
375 }

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ IsBridgeWater

bool Cell.IsBridgeWater
get

Definition at line 769 of file Cell.cs.

770 {
771 get
772 {
773 if (_bridge != 0)
774 {
775 return floorList[_bridge].tileType.IsWater;
776 }
777 return false;
778 }
779 }
static List< SourceFloor.Row > floorList
Definition: Cell.cs:16

Referenced by BaseTileMap.DrawTile().

◆ isClearArea

bool Cell.isClearArea
getset

Definition at line 605 of file Cell.cs.

606 {
607 get
608 {
609 return bits2[3];
610 }
611 set
612 {
613 bits2[3] = value;
614 }
615 }

Referenced by BaseTileMap.DrawTile(), AM_FlagCell.HitTest(), AM_FlagCell.OnProcessTiles(), and MapSubset.OnSave().

◆ isClearSnow

bool Cell.isClearSnow
getset

Definition at line 449 of file Cell.cs.

450 {
451 get
452 {
453 return bits[22];
454 }
455 set
456 {
457 bits[22] = value;
458 }
459 }

Referenced by Chara._Move(), BaseTileMap.DrawRoof(), BaseTileMap.DrawTile(), AM_FlagCell.HitTest(), AM_FlagCell.OnProcessTiles(), and Map.Save().

◆ isCurtainClosed

bool Cell.isCurtainClosed
getset

Definition at line 581 of file Cell.cs.

582 {
583 get
584 {
585 return bits2[1];
586 }
587 set
588 {
589 bits2[1] = value;
590 }
591 }

Referenced by Refresh().

◆ isDeck

bool Cell.isDeck
getset

Definition at line 509 of file Cell.cs.

510 {
511 get
512 {
513 return bits[27];
514 }
515 set
516 {
517 bits[27] = value;
518 }
519 }

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ IsDeepWater

bool Cell.IsDeepWater
get

Definition at line 793 of file Cell.cs.

794 {
795 get
796 {
797 if (sourceSurface.tileType.IsDeepWater)
798 {
799 return !IsIceTile;
800 }
801 return false;
802 }
803 }
bool IsIceTile
Definition: Cell.cs:806
SourceFloor.Row sourceSurface
Definition: Cell.cs:1059

Referenced by CanSuffocate(), and Refresh().

◆ IsFarmField

bool Cell.IsFarmField
get

Definition at line 729 of file Cell.cs.

730 {
731 get
732 {
733 if (_bridge != 0)
734 {
735 return sourceBridge.alias == "field";
736 }
737 return sourceFloor.alias == "field";
738 }
739 }

Referenced by GameUpdater.SurfaceUpdater.FixedUpdate(), and Zone.RainWater().

◆ isFloating

bool Cell.isFloating
getset

Definition at line 473 of file Cell.cs.

474 {
475 get
476 {
477 return bits[24];
478 }
479 set
480 {
481 bits[24] = value;
482 }
483 }

Referenced by Chara._Move(), PartialMap.Apply(), BaseTileMap.DrawTile(), BaseTileMap.GetThingPosition(), CharaActorPCC.OnRender(), Refresh(), and Chara.Tick().

◆ IsFloorWater

◆ isForceFloat

bool Cell.isForceFloat
getset

Definition at line 305 of file Cell.cs.

306 {
307 get
308 {
309 return bits[8];
310 }
311 set
312 {
313 bits[8] = value;
314 }
315 }

Referenced by BaseTileMap.DrawTile(), AM_FlagCell.HitTest(), AM_FlagCell.OnProcessTiles(), Refresh(), and Map.Save().

◆ isHarvested

bool Cell.isHarvested
getset

Definition at line 329 of file Cell.cs.

330 {
331 get
332 {
333 return bits[10];
334 }
335 set
336 {
337 bits[10] = value;
338 }
339 }

Referenced by GrowSystem.CanHarvest(), GrowSystemWheat.GetStageTile(), GrowSystem.OnRenderTileMap(), and Map.Save().

◆ IsIceTile

bool Cell.IsIceTile
get

Definition at line 805 of file Cell.cs.

806 {
807 get
808 {
810 {
811 return !isClearSnow;
812 }
813 return false;
814 }
815 }
bool isClearSnow
Definition: Cell.cs:450
Zone zone
Definition: Map.cs:87

Referenced by CharaActorPCC.OnRender().

◆ IsLotEdge

bool Cell.IsLotEdge
get

Definition at line 879 of file Cell.cs.

880 {
881 get
882 {
883 if (Front.room != null && Right.room != null && FrontRight.room != null && Back.room != null && Left.room != null && (Front.room == null || (!Front.room.data.atrium && Front.HasRoof)))
884 {
885 if (Right.room != null)
886 {
887 return Right.room.data.atrium | !Right.HasRoof;
888 }
889 return false;
890 }
891 return true;
892 }
893 }
bool atrium
Definition: AreaData.cs:66
AreaData data
Definition: BaseArea.cs:29
Cell Back
Definition: Cell.cs:153
Cell Left
Definition: Cell.cs:165

◆ isModified

bool Cell.isModified
getset

Definition at line 437 of file Cell.cs.

438 {
439 get
440 {
441 return bits[21];
442 }
443 set
444 {
445 bits[21] = value;
446 }
447 }

Referenced by Map.MineBlock(), GenRoom.Populate(), and Map.Save().

◆ IsNotWaterEdge

bool Cell.IsNotWaterEdge
get

Definition at line 687 of file Cell.cs.

688 {
689 get
690 {
691 if (!HasFullBlock && !floorList[_floor].tileType.IsWater)
692 {
693 return floorList[_floor].edge == 0;
694 }
695 return true;
696 }
697 }

Referenced by Refresh().

◆ isObjDyed

bool Cell.isObjDyed
getset

Definition at line 617 of file Cell.cs.

618 {
619 get
620 {
621 return bits2[4];
622 }
623 set
624 {
625 bits2[4] = value;
626 }
627 }

Referenced by TraitDye.OnThrowGround(), and Map.Save().

◆ IsRoomEdge

bool Cell.IsRoomEdge
get

Definition at line 867 of file Cell.cs.

868 {
869 get
870 {
871 if (Front.room == room && Right.room == room)
872 {
873 return FrontRight.room != room;
874 }
875 return true;
876 }
877 }

Referenced by BaseTileMap.DrawRoof(), and BaseTileMap.DrawTile().

◆ isSeen

bool Cell.isSeen
getset

◆ isShadowed

bool Cell.isShadowed
getset

Definition at line 245 of file Cell.cs.

246 {
247 get
248 {
249 return bits[1];
250 }
251 set
252 {
253 bits[1] = value;
254 }
255 }

Referenced by Effect._Play(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), and Refresh().

◆ isShoreSand

bool Cell.isShoreSand
getset

Definition at line 545 of file Cell.cs.

546 {
547 get
548 {
549 return bits[30];
550 }
551 set
552 {
553 bits[30] = value;
554 }
555 }

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ IsSky

bool Cell.IsSky
get

Definition at line 933 of file Cell.cs.

934 {
935 get
936 {
937 if (sourceFloor.tileType == TileType.Sky)
938 {
939 return !HasBridge;
940 }
941 return false;
942 }
943 }
bool HasBridge
Definition: Cell.cs:671

◆ isSkyFloor

bool Cell.isSkyFloor
getset

Definition at line 593 of file Cell.cs.

594 {
595 get
596 {
597 return bits2[2];
598 }
599 set
600 {
601 bits2[2] = value;
602 }
603 }

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ isSlopeEdge

bool Cell.isSlopeEdge
getset

Definition at line 353 of file Cell.cs.

354 {
355 get
356 {
357 return bits[12];
358 }
359 set
360 {
361 bits[12] = value;
362 }
363 }

Referenced by BaseTileMap.DrawTile(), TileMapElona.DrawTile(), and Refresh().

◆ IsSnowTile

◆ isSurrounded

bool Cell.isSurrounded
getset

Definition at line 233 of file Cell.cs.

234 {
235 get
236 {
237 return bits[0];
238 }
239 set
240 {
241 bits[0] = value;
242 }
243 }

Referenced by TaskPoint._CanPerformTask(), UIMapPreview._RefreshPoint(), BaseTileMap.DrawTile(), TileMapElona.DrawTile(), Zone_RandomDungeonFactory.OnGenerateMap(), Zone_VernisMine.OnGenerateMap(), and Refresh().

◆ isSurrounded4d

bool Cell.isSurrounded4d
getset

Definition at line 293 of file Cell.cs.

294 {
295 get
296 {
297 return bits[7];
298 }
299 set
300 {
301 bits[7] = value;
302 }
303 }

Referenced by Refresh().

◆ isToggleWallPillar

bool Cell.isToggleWallPillar
getset

Definition at line 557 of file Cell.cs.

558 {
559 get
560 {
561 return bits[31];
562 }
563 set
564 {
565 bits[31] = value;
566 }
567 }

Referenced by BaseTileMap.DrawTile(), AM_FlagCell.OnProcessTiles(), and Map.Save().

◆ IsTopWater

◆ IsTopWaterAndNoSnow

bool Cell.IsTopWaterAndNoSnow
get

◆ IsVoid

bool Cell.IsVoid
get

Definition at line 959 of file Cell.cs.

Referenced by Map.GetRampDir().

◆ isWallEdge

bool Cell.isWallEdge
getset

Definition at line 425 of file Cell.cs.

426 {
427 get
428 {
429 return bits[20];
430 }
431 set
432 {
433 bits[20] = value;
434 }
435 }

Referenced by BaseTileMap.Draw(), BaseTileMap.DrawTile(), and Refresh().

◆ isWatered

bool Cell.isWatered
getset

Definition at line 341 of file Cell.cs.

342 {
343 get
344 {
345 return bits[11];
346 }
347 set
348 {
349 bits[11] = value;
350 }
351 }

Referenced by BaseTileMap.DrawTile(), Map.Save(), and TaskWater.ShouldWater().

◆ Left

◆ liquidLv

int Cell.liquidLv
get

Definition at line 945 of file Cell.cs.

946 {
947 get
948 {
949 if (effect != null && effect.LiquidAmount != 0)
950 {
951 return (effect?.LiquidAmount ?? 0) / 3 + 1;
952 }
953 return 0;
954 }
955 }
int LiquidAmount
Definition: CellEffect.cs:162

Referenced by BaseTileMap.DrawTile().

◆ lotShade

bool Cell.lotShade
getset

Definition at line 533 of file Cell.cs.

534 {
535 get
536 {
537 return bits[29];
538 }
539 set
540 {
541 bits[29] = value;
542 }
543 }

Referenced by BaseTileMap.DrawTile(), and Refresh().

◆ lotWall

bool Cell.lotWall
getset

Definition at line 485 of file Cell.cs.

486 {
487 get
488 {
489 return bits[25];
490 }
491 set
492 {
493 bits[25] = value;
494 }
495 }

Referenced by BaseTileMap.DrawTile().

◆ matBlock

◆ matBridge

◆ matFloor

◆ matObj

◆ matObj_fixed

SourceMaterial.Row Cell.matObj_fixed
get

Definition at line 1038 of file Cell.cs.

1039 {
1040 get
1041 {
1042 if (!isObjDyed)
1043 {
1044 return matList[objMat];
1045 }
1046 return sourceObj.DefaultMaterial;
1047 }
1048 }
bool isObjDyed
Definition: Cell.cs:618
static List< SourceMaterial.Row > matList
Definition: Cell.cs:12

Referenced by Map.Burn(), Map.MineObj(), GrowSystem.OnMineObj(), and GrowSystemTree.OnMineObj().

◆ matRoofBlock

SourceMaterial.Row Cell.matRoofBlock
get

Definition at line 1028 of file Cell.cs.

Referenced by PartialMap.Save().

◆ nonGradient

bool Cell.nonGradient
getset

Definition at line 389 of file Cell.cs.

390 {
391 get
392 {
393 return bits[15];
394 }
395 set
396 {
397 bits[15] = value;
398 }
399 }

◆ objDir

int Cell.objDir
getset

Definition at line 909 of file Cell.cs.

910 {
911 get
912 {
913 return _dirs / 4 % 8;
914 }
915 set
916 {
917 _dirs = (byte)(_dirs - objDir * 4 + value % 8 * 4);
918 }
919 }

Referenced by PartialMap.Apply(), BaseTileMap.DrawTile(), Recipe.HasSameTile(), and RotateObj().

◆ outOfBounds

bool Cell.outOfBounds
getset

Definition at line 413 of file Cell.cs.

414 {
415 get
416 {
417 return bits[17];
418 }
419 set
420 {
421 bits[17] = value;
422 }
423 }

Referenced by ActPlan._Update(), BaseTileMap.DrawTile(), WidgetMinimap.OnPointerDown(), Refresh(), and Fov.SetVisible().

◆ Right

◆ skipRender

bool Cell.skipRender
getset

Definition at line 269 of file Cell.cs.

270 {
271 get
272 {
273 return bits[4];
274 }
275 set
276 {
277 bits[4] = value;
278 }
279 }

Referenced by BaseTileMap.DrawTile(), Recipe.OnRenderMarker(), RecipeCard.OnRenderMarker(), and Card.RenderMarker().

◆ sourceBlock

◆ sourceBridge

◆ sourceEffect

SourceCellEffect.Row Cell.sourceEffect
get

◆ sourceFloor

◆ sourceObj

◆ sourceRoofBlock

SourceBlock.Row Cell.sourceRoofBlock
get

Definition at line 1050 of file Cell.cs.

Referenced by PartialMap.Save().

◆ sourceSurface

SourceFloor.Row Cell.sourceSurface
get

Definition at line 1058 of file Cell.cs.

1059 {
1060 get
1061 {
1062 if (_bridge != 0)
1063 {
1064 return sourceBridge;
1065 }
1066 return sourceFloor;
1067 }
1068 }

Referenced by Chara._Move(), TaskPourWater.CanProgress(), CharaRenderer.DrawHeld(), CharaActorPCC.OnRender(), and HotItemHeld.TrySetToolAct().

◆ Things

List<Thing> Cell.Things
get

◆ TopHeight

byte Cell.TopHeight
get

Definition at line 116 of file Cell.cs.

117 {
118 get
119 {
120 if (bridgeHeight != 0)
121 {
122 return bridgeHeight;
123 }
124 return height;
125 }
126 }

Referenced by BaseTileMap.Draw(), TileMapElona.Draw(), BaseTileMap.DrawRoof(), and Room.Refresh().

◆ UseLowBlock

bool Cell.UseLowBlock
get

Definition at line 861 of file Cell.cs.

Referenced by BaseTileMap.Draw(), and TileMapElona.Draw().


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