Elin Decompiled Documentation EA 23.321 Nightly Patch 1
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 ()
 
void DyeObj (string id)
 
float GetSurfaceHeight ()
 
bool HasZoneStairs (bool includeLocked=true)
 
override bool IsPathBlocked (IPathfindWalker walker, PathManager.MoveType moveType)
 
virtual bool IsPathBlocked (IPathfindWalker walker, 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 _deco
 
byte _decoMat
 
byte x
 
byte z
 
byte light
 
byte autotile
 
byte autotileDeco
 
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< SourceDeco.RowdecoList
 
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 matDeco [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]
 
SourceDeco.Row sourceDeco [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 1586 of file Cell.cs.

1587 {
1589 if (c.isChara)
1590 {
1591 detail.charas.Add(c.Chara);
1592 return;
1593 }
1595 c.Thing.stackOrder = detail.things.Count - 1;
1597 {
1599 }
1600 }
void Add(Act a, string s="")
Definition: ActPlan.cs:11
virtual Chara Chara
Definition: Card.cs:2122
Trait trait
Definition: Card.cs:54
virtual bool isChara
Definition: Card.cs:2135
virtual Thing Thing
Definition: Card.cs:2110
virtual CardRow sourceCard
Definition: Card.cs:2183
List< Thing > things
Definition: CellDetail.cs:11
List< Chara > charas
Definition: CellDetail.cs:13
CellDetail GetOrCreateDetail()
Definition: Cell.cs:1569
CellDetail detail
Definition: Cell.cs:100
Point GetPoint()
Definition: Cell.cs:1113
void RefreshNeighborTiles()
Definition: Point.cs:1282
bool multisize
Definition: RenderRow.cs:64
virtual bool ShouldRefreshTile
Definition: Trait.cs:77

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 1155 of file Cell.cs.

1156 {
1157 if (HasRamp)
1158 {
1159 return blockDir == dir;
1160 }
1161 return true;
1162 }
bool HasRamp
Definition: Cell.cs:845
int blockDir
Definition: Cell.cs:906

References blockDir, and HasRamp.

Referenced by Map.GetRampDir().

◆ CanGrow()

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

Definition at line 1689 of file Cell.cs.

1690 {
1691 GrowSystem.cell = this;
1692 return obj.growth?.CanGrow(date) ?? false;
1693 }
byte obj
Definition: Cell.cs:40

References obj.

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

◆ CanHarvest()

bool Cell.CanHarvest ( )
inline

Definition at line 1700 of file Cell.cs.

1701 {
1702 return growth?.CanHarvest() ?? false;
1703 }
GrowSystem growth
Definition: Cell.cs:233
bool CanHarvest()
Definition: GrowSystem.cs:520

References GrowSystem.CanHarvest(), and growth.

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

◆ CanMakeStraw()

bool Cell.CanMakeStraw ( )
inline

Definition at line 1710 of file Cell.cs.

1711 {
1712 if (sourceObj.alias == "wheat")
1713 {
1714 return growth.IsLastStage();
1715 }
1716 return false;
1717 }
SourceObj.Row sourceObj
Definition: Cell.cs:1084
bool IsLastStage()
Definition: GrowSystem.cs:119

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

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

◆ CanReapSeed()

bool Cell.CanReapSeed ( )
inline

Definition at line 1705 of file Cell.cs.

1706 {
1707 return growth?.CanReapSeed() ?? false;
1708 }
virtual bool CanReapSeed()
Definition: GrowSystem.cs:529

References GrowSystem.CanReapSeed(), and growth.

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

◆ CanSuffocate()

bool Cell.CanSuffocate ( )
inline

Definition at line 1123 of file Cell.cs.

1124 {
1126 {
1127 return true;
1128 }
1129 if (!IsDeepWater)
1130 {
1131 return false;
1132 }
1133 if (detail != null && detail.things.Count > 0)
1134 {
1135 foreach (Thing thing in detail.things)
1136 {
1137 if (thing.IsInstalled && thing.isFloating)
1138 {
1139 return false;
1140 }
1141 }
1142 }
1143 return true;
1144 }
bool isFloating
Definition: Card.cs:653
bool IsInstalled
Definition: Card.cs:2451
bool IsDeepWater
Definition: Cell.cs:802
Definition: EClass.cs:6
static Zone _zone
Definition: EClass.cs:21
Definition: Thing.cs:8
virtual bool IsUserZone
Definition: Zone.cs:275
virtual bool IsUnderwater
Definition: Zone.cs:273

References EClass._zone, detail, IsDeepWater, Card.isFloating, Card.IsInstalled, Zone.IsUnderwater, Zone.IsUserZone, and CellDetail.things.

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

◆ DyeObj()

void Cell.DyeObj ( string  id)
inline

Definition at line 1724 of file Cell.cs.

1725 {
1726 isObjDyed = true;
1727 objMat = (byte)EClass.sources.materials.alias[id].id;
1728 }
byte objMat
Definition: Cell.cs:44
bool isObjDyed
Definition: Cell.cs:626
static SourceManager sources
Definition: EClass.cs:43
SourceMaterial materials

References isObjDyed, SourceManager.materials, objMat, and EClass.sources.

Referenced by GrowSystemFlower.OnSetObj().

◆ Equals()

override bool Cell.Equals ( object  obj)
inline

Definition at line 1098 of file Cell.cs.

1099 {
1100 return false;
1101 }

◆ GetBlockName()

string Cell.GetBlockName ( )
inline

Definition at line 1625 of file Cell.cs.

1626 {
1627 return Lang.Parse("blockName", matBlock.GetName(), sourceBlock.GetName());
1628 }
SourceBlock.Row sourceBlock
Definition: Cell.cs:1062
SourceMaterial.Row matBlock
Definition: Cell.cs:1038
Definition: Lang.cs:7
static string Parse(string idLang, string val1, string val2=null, string val3=null, string val4=null, string val5=null)
Definition: Lang.cs:146

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 1635 of file Cell.cs.

1636 {
1637 return Lang.Parse("blockName", matBridge.GetName(), sourceBridge.GetName());
1638 }
SourceMaterial.Row matBridge
Definition: Cell.cs:1044
SourceFloor.Row sourceBridge
Definition: Cell.cs:1066

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

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

◆ GetFloorName()

string Cell.GetFloorName ( )
inline

Definition at line 1630 of file Cell.cs.

1631 {
1632 return Lang.Parse("blockName", matFloor.GetName(), sourceFloor.GetName());
1633 }
SourceFloor.Row sourceFloor
Definition: Cell.cs:1064
SourceMaterial.Row matFloor
Definition: Cell.cs:1040

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 1108 of file Cell.cs.

1109 {
1110 return index;
1111 }
int index
Definition: Cell.cs:122

References index.

◆ GetLiquidName()

string Cell.GetLiquidName ( )
inline

Definition at line 1684 of file Cell.cs.

1685 {
1686 return Lang.Parse("liquidName", sourceEffect.GetName());
1687 }
SourceCellEffect.Row sourceEffect
Definition: Cell.cs:1082

References Lang.Parse(), and sourceEffect.

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

◆ GetObjName()

string Cell.GetObjName ( )
inline

Definition at line 1640 of file Cell.cs.

1641 {
1642 PlantData plantData = EClass._map.TryGetPlant(this);
1643 string text = sourceObj.GetName();
1644 if (sourceObj.tag.Contains("mat_name") && matObj.alias != "granite" && (sourceObj.id != 10 || !(matObj.alias == "crystal")))
1645 {
1646 text = "_of2".lang(matObj.GetName(), text);
1647 }
1648 if (plantData != null && plantData.size > 0)
1649 {
1650 text = Lang.GetList("plant_size")[plantData.size - 1] + text;
1651 }
1652 text = text.AddArticle();
1653 if (plantData != null)
1654 {
1655 if (plantData.seed != null)
1656 {
1657 if (!plantData.seed.c_refText.IsEmpty())
1658 {
1659 text = plantData.seed.c_refText;
1660 }
1661 if (plantData.seed.encLV > 0)
1662 {
1663 text = text + "+" + plantData.seed.encLV;
1664 }
1665 }
1666 if (plantData.fert != 0)
1667 {
1668 text += ((plantData.fert > 0) ? "fertilized" : "defertilized").lang();
1669 }
1670 }
1671 if (map.backerObjs.ContainsKey(index))
1672 {
1673 int key = map.backerObjs[index];
1674 SourceBacker.Row row = EClass.sources.backers.map.TryGetValue(key);
1675 if (row != null && EClass.core.config.backer.Show(row))
1676 {
1677 string name = row.Name;
1678 text = ((sourceObj.id == 82) ? "backerRemain".lang(text, name) : "backerTree".lang(text, name));
1679 }
1680 }
1681 return text;
1682 }
string c_refText
Definition: Card.cs:1669
int encLV
Definition: Card.cs:329
SourceMaterial.Row matObj
Definition: Cell.cs:1046
static Map map
Definition: Cell.cs:8
BackerContentConfig backer
Definition: CoreConfig.cs:621
CoreConfig config
Definition: Core.cs:70
static Core core
Definition: EClass.cs:7
static Map _map
Definition: EClass.cs:19
static string[] GetList(string id)
Definition: Lang.cs:113
PlantData TryGetPlant(Point p)
Definition: Map.cs:1987
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:273

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 1569 of file Cell.cs.

1570 {
1571 if (detail == null)
1572 {
1574 }
1575 return detail;
1576 }
static CellDetail Spawn()
Definition: CellDetail.cs:25

References detail, and CellDetail.Spawn().

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

◆ GetPoint()

◆ GetSharedPoint()

Point Cell.GetSharedPoint ( )
inline

Definition at line 1118 of file Cell.cs.

1119 {
1120 return Point.shared.Set(x, z);
1121 }
static Point shared
Definition: Point.cs:20
Point Set(int _x, int _z)
Definition: Point.cs:503

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

Referenced by Map.Burn().

◆ GetSurfaceHeight()

float Cell.GetSurfaceHeight ( )
inline

Definition at line 1730 of file Cell.cs.

1731 {
1732 if (detail == null)
1733 {
1734 return 0f;
1735 }
1736 bool isTopWater = IsTopWater;
1737 for (int i = 0; i < detail.things.Count; i++)
1738 {
1739 Thing thing = detail.things[i];
1740 if (!thing.IsInstalled)
1741 {
1742 continue;
1743 }
1744 if (isTopWater)
1745 {
1746 if (thing.isFloating)
1747 {
1748 return thing.Pref.height + 0.1f;
1749 }
1750 }
1751 else if (thing.Pref.Surface)
1752 {
1753 return 0.1f * (float)thing.altitude + thing.Pref.height;
1754 }
1755 }
1756 return 0f;
1757 }
int altitude
Definition: Card.cs:233
bool IsTopWater
Definition: Cell.cs:708
bool Surface
Definition: SourcePref.cs:330
float height
Definition: SourcePref.cs:51
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 1146 of file Cell.cs.

1147 {
1148 if (!blocked && _block == 0 && obj == 0)
1149 {
1150 return hasDoor;
1151 }
1152 return true;
1153 }
byte _block
Definition: Cell.cs:32
bool hasDoor
Definition: Cell.cs:266

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

Referenced by BiomeProfile.Populate().

◆ HasZoneStairs()

bool Cell.HasZoneStairs ( bool  includeLocked = true)
inline

Definition at line 1759 of file Cell.cs.

1760 {
1761 if (detail == null)
1762 {
1763 return false;
1764 }
1765 foreach (Thing thing in detail.things)
1766 {
1767 if (thing.IsInstalled && (thing.trait is TraitStairs || (includeLocked && thing.trait is TraitStairsLocked)))
1768 {
1769 return true;
1770 }
1771 }
1772 return false;
1773 }

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

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

◆ IsPathBlocked()

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

Reimplemented from Algorithms.WeightCell.

Definition at line 1775 of file Cell.cs.

1776 {
1777 if (IsSky || outOfBounds)
1778 {
1779 return true;
1780 }
1781 if (moveType == PathManager.MoveType.Default)
1782 {
1783 if (walker.IsAstralBody && !EClass._zone.IsRegion)
1784 {
1785 return false;
1786 }
1787 return blocked;
1788 }
1789 if (!blocked || (walker.IsAstralBody && !EClass._zone.IsRegion))
1790 {
1791 if (detail != null)
1792 {
1793 return detail.charas.Count > 0;
1794 }
1795 return false;
1796 }
1797 return true;
1798 }
bool IsSky
Definition: Cell.cs:942
bool outOfBounds
Definition: Cell.cs:422
virtual bool IsRegion
Definition: Spatial.cs:515

References EClass._zone, Algorithms.WeightCell.blocked, detail, IPathfindWalker.IsAstralBody, Spatial.IsRegion, IsSky, and outOfBounds.

◆ Refresh()

void Cell.Refresh ( )
inline

Definition at line 1164 of file Cell.cs.

1165 {
1166 Cell cell2 = ((x > 0) ? cells[x - 1, z] : Void);
1167 Cell cell3 = ((x + 1 < Size) ? cells[x + 1, z] : Void);
1168 Cell cell4 = ((z > 0) ? cells[x, z - 1] : Void);
1169 Cell cell5 = ((z + 1 < Size) ? cells[x, z + 1] : Void);
1170 Cell cell6 = ((x > 0 && z > 0) ? cells[x - 1, z - 1] : Void);
1171 Cell cell7 = ((x + 1 < Size && z > 0) ? cells[x + 1, z - 1] : Void);
1172 Cell cell8 = ((x > 0 && z + 1 < Size) ? cells[x - 1, z + 1] : Void);
1173 Cell cell9 = ((x + 1 < Size && z + 1 < Size) ? cells[x + 1, z + 1] : Void);
1174 Cell cell10 = ((z > 1) ? cells[x, z - 2] : Void);
1175 Cell cell11 = ((x + 2 < Size) ? cells[x + 2, z] : Void);
1176 TileType tileType = sourceBlock.tileType;
1177 TileType tileType2 = sourceFloor.tileType;
1178 MapBounds bounds = map.bounds;
1179 bool hasBridge = _bridge != 0;
1180 outOfBounds = x < bounds.x || z < bounds.z || x > bounds.maxX || z > bounds.maxZ;
1181 isSurrounded4d = cell2.HasFullBlock && cell3.HasFullBlock && cell4.HasFullBlock && cell5.HasFullBlock;
1182 isSurrounded = isSurrounded4d && cell6.HasFullBlock && cell7.HasFullBlock && cell8.HasFullBlock && cell9.HasFullBlock && cell4.bridgeHeight == bridgeHeight && cell3.bridgeHeight == bridgeHeight && cell5.bridgeHeight == bridgeHeight && cell2.bridgeHeight == bridgeHeight;
1184 hasDoor = false;
1185 hasDoorBoat = false;
1186 isDeck = false;
1187 isShoreSand = false;
1188 hasWindow = false;
1189 isCurtainClosed = false;
1190 isSkyFloor = tileType2 != TileType.Sky && (cell3.sourceFloor.tileType == TileType.Sky || cell4.sourceFloor.tileType == TileType.Sky);
1191 openPath = false;
1192 openSight = tileType.IsOpenSight || (cell4.hasWindow && !cell4.isCurtainClosed) || (cell3.hasWindow && !cell3.isCurtainClosed);
1193 blockSight = tileType.IsBlockSight || ((objList[obj].growth != null) ? objList[obj].growth.BlockSight(this) : objList[obj].tileType.IsBlockSight);
1194 blocked = outOfBounds || tileType.IsBlockPass || (tileType2.IsBlockPass && !hasBridge) || ((objList[obj].growth != null) ? objList[obj].growth.BlockPass(this) : objList[obj].tileType.IsBlockPass) || impassable;
1195 isSlopeEdge = height > cell3.height || height > cell4.height;
1196 if (hasBridge && sourceBridge.tileType.ShowPillar)
1197 {
1198 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;
1199 }
1200 else
1201 {
1202 isBridgeEdge = false;
1203 }
1204 lotShade = false;
1205 if (room == null && !EClass._zone.IsSnowCovered)
1206 {
1207 if ((cell11.room != null && cell3.sourceBlock.tileType.CastShadowSelf) || (cell10.room != null && cell4.sourceBlock.tileType.CastShadowSelf))
1208 {
1209 lotShade = true;
1210 }
1211 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))
1212 {
1213 lotShade = true;
1214 }
1215 else if (cell11.sourceBlock.tileType.CastShadowSelf && cell11.Right.room != null)
1216 {
1217 lotShade = true;
1218 }
1219 }
1220 isShadowed = lotShade || sourceBlock.tileType.CastShadowSelf || cell4.sourceBlock.tileType.CastShadowBack || (!HasRoof && _roofBlock != 0);
1221 castFloorShadow = lotShade || (room == null && sourceBlock.tileType.CastShadowSelf);
1222 byte b = (hasBridge ? bridgeHeight : height);
1223 byte b2 = ((cell4.bridgeHeight == 0) ? cell4.height : cell4.bridgeHeight);
1224 byte b3 = ((cell3.bridgeHeight == 0) ? cell3.height : cell3.bridgeHeight);
1225 byte b4 = ((cell10.bridgeHeight == 0) ? cell10.height : cell10.bridgeHeight);
1226 byte b5 = ((cell11.bridgeHeight == 0) ? cell11.height : cell11.bridgeHeight);
1227 int num = 0;
1228 if (b3 - b > num)
1229 {
1230 num = b3 - b;
1231 }
1232 if (b2 - b > num)
1233 {
1234 num = b2 - b;
1235 }
1236 if (b5 - b - 4 > num)
1237 {
1238 num = b5 - b - 4;
1239 }
1240 if (b4 - b - 4 > num)
1241 {
1242 num = b4 - b - 4;
1243 }
1244 num -= 4;
1245 if (num > 15)
1246 {
1247 num = 15;
1248 }
1249 if (IsTopWater)
1250 {
1251 num /= 3;
1252 }
1253 else if (isShadowed)
1254 {
1255 num /= 2;
1256 }
1257 if (num <= 0)
1258 {
1259 num = 0;
1260 }
1261 shadowMod = (byte)num;
1262 baseWeight = 0;
1263 if (detail != null && detail.things.Count > 0)
1264 {
1265 for (int i = 0; i < detail.things.Count; i++)
1266 {
1267 Thing thing = detail.things[i];
1268 if (!thing.IsInstalled)
1269 {
1270 continue;
1271 }
1272 if (thing.trait.WeightMod > baseWeight)
1273 {
1274 baseWeight = thing.trait.WeightMod;
1275 }
1276 if (thing.isHidden)
1277 {
1278 continue;
1279 }
1280 if (thing.trait.IsFloating)
1281 {
1282 isFloating = true;
1283 if (IsFloorWater)
1284 {
1285 blocked = true;
1286 }
1287 else
1288 {
1289 isDeck = true;
1290 }
1291 }
1292 else
1293 {
1294 if (thing.trait.IsOpenPath)
1295 {
1296 blocked = false;
1297 hasDoorBoat = true;
1298 openPath = true;
1299 openSight = true;
1300 }
1301 if (thing.trait.IsBlockPath)
1302 {
1303 blocked = true;
1304 }
1305 }
1306 if (thing.trait.IsOpenSight)
1307 {
1308 openSight = true;
1309 }
1310 if (thing.trait is TraitDoor)
1311 {
1312 blocked = false;
1313 hasDoor = true;
1314 blockSight = true;
1315 }
1316 else if (thing.trait.IsBlockSight)
1317 {
1318 blockSight = true;
1319 }
1320 Trait trait = thing.trait;
1321 if (!(trait is TraitWindow))
1322 {
1323 if (trait is TraitCurtain)
1324 {
1325 isCurtainClosed = thing.isOn;
1326 }
1327 }
1328 else
1329 {
1330 hasWindow = true;
1331 }
1332 }
1333 }
1334 minHeight = (byte)(10 + b + ((IsTopWater && !isFloating) ? sourceFloor.tileType.FloorAltitude : 0));
1335 topHeight = (byte)(minHeight + tileType.slopeHeight);
1336 weights[0] = (byte)((Mathf.Abs(cell4.minHeight - topHeight) <= 8 || Mathf.Abs(cell4.topHeight - minHeight) <= 8) ? 1u : 0u);
1337 weights[1] = (byte)((Mathf.Abs(cell3.minHeight - topHeight) <= 8 || Mathf.Abs(cell3.topHeight - minHeight) <= 8) ? 1u : 0u);
1338 weights[2] = (byte)((Mathf.Abs(cell5.minHeight - topHeight) <= 8 || Mathf.Abs(cell5.topHeight - minHeight) <= 8) ? 1u : 0u);
1339 weights[3] = (byte)((Mathf.Abs(cell2.minHeight - topHeight) <= 8 || Mathf.Abs(cell2.topHeight - minHeight) <= 8) ? 1u : 0u);
1340 if (IsDeepWater)
1341 {
1342 baseWeight += 100;
1343 }
1344 ignoreObjShadow = (b2 > b && b2 - b > 6) || (b3 > b && b3 - b > 6);
1345 isWallEdge = !blocked && cell3.sourceBlock.tileType.IsWallOrFence && cell3.blockDir != 1 && cell4.sourceBlock.tileType.IsWallOrFence && cell4.blockDir != 0;
1346 if (isWallEdge)
1347 {
1348 blockSight = cell3.sourceBlock.tileType.IsBlockSight && cell4.sourceBlock.tileType.IsBlockSight;
1349 blocked = true;
1350 blockSight = true;
1351 }
1352 shadow = 0;
1353 if (!HasBlock)
1354 {
1355 if (cell2.isSeen && cell2.CastAmbientShadow && !cell2.hasDoor && bridgeHeight == cell2.bridgeHeight && !sourceFloor.ignoreTransition && (!cell2.sourceBlock.tileType.IsWallOrFence || cell2.blockDir != 0))
1356 {
1357 shadow++;
1358 }
1359 if (cell5.isSeen && cell5.CastAmbientShadow && !cell5.hasDoor && bridgeHeight == cell5.bridgeHeight && !sourceFloor.ignoreTransition && (!cell5.sourceBlock.tileType.IsWallOrFence || cell5.blockDir != 1))
1360 {
1361 shadow += 2;
1362 }
1363 }
1364 else
1365 {
1366 if (isFloating && (room != null || cell4.room != null || cell3.room != null || cell7.room != null))
1367 {
1368 isFloating = false;
1369 }
1370 if (sourceBlock.tileType.IsFence && !hasDoor && (blockDir != 0 || cell5.topHeight >= b - 3) && (blockDir != 1 || cell2.topHeight >= b - 3))
1371 {
1372 shadow = (byte)(blockDir + 4);
1373 }
1374 }
1375 bool isFloorWater = IsFloorWater;
1376 if (isFloorWater)
1377 {
1378 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);
1379 isShoreSand = cell5.sourceFloor.isBeach || cell3.sourceFloor.isBeach || cell4.sourceFloor.isBeach || cell2.sourceFloor.isBeach;
1380 if (shore != 0)
1381 {
1382 shore += (byte)(isShoreSand ? 2 : 3);
1383 }
1384 }
1385 else
1386 {
1387 shore = 0;
1388 }
1389 if (sourceFloor.autotile > 0)
1390 {
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));
1392 }
1393 else
1394 {
1395 autotile = 0;
1396 }
1397 if (sourceDeco.autotile > 0)
1398 {
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));
1400 }
1401 else
1402 {
1403 autotileDeco = 0;
1404 }
1405 if (_bridge != 0 && sourceBridge.autotile > 0)
1406 {
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));
1408 }
1409 else
1410 {
1411 autotileBridge = 0;
1412 }
1413 if (obj != 0 && sourceObj.autoTile)
1414 {
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));
1416 }
1417 else
1418 {
1419 autotileObj = 0;
1420 }
1421 if (openSight)
1422 {
1423 blockSight = false;
1424 }
1425 if (openPath)
1426 {
1427 blocked = false;
1428 }
1429 bool IsAutoTileEdge(Cell cell)
1430 {
1431 if (!sourceFloor.isBeach && !cell.sourceFloor.isBeach && (cell._floor != _floor || cell._floorMat != _floorMat))
1432 {
1433 return true;
1434 }
1435 if (!isFloorWater)
1436 {
1437 return height != cell.height;
1438 }
1439 return false;
1440 }
1441 bool IsBridgeAutoTileEdge(Cell cell)
1442 {
1443 if (cell._bridge != _bridge || cell._bridgeMat != _bridgeMat)
1444 {
1445 return true;
1446 }
1447 return bridgeHeight != cell.bridgeHeight;
1448 }
1449 bool IsDecoAutoTileEdge(Cell cell)
1450 {
1451 if (cell._deco != _deco || cell._decoMat != _decoMat)
1452 {
1453 return true;
1454 }
1455 if (!hasBridge)
1456 {
1457 return topHeight != cell.topHeight;
1458 }
1459 return bridgeHeight != cell.bridgeHeight;
1460 }
1461 bool IsObjAutoTileEdge(Cell cell)
1462 {
1463 if (cell.obj != obj && (obj != 31 || (cell.obj != 97 && cell.obj != 98)))
1464 {
1465 return true;
1466 }
1467 if (!hasBridge)
1468 {
1469 return topHeight != cell.topHeight;
1470 }
1471 return bridgeHeight != cell.bridgeHeight;
1472 }
1473 }
bool isHidden
Definition: Card.cs:533
bool isOn
Definition: Card.cs:545
Definition: Cell.cs:7
static Cell[,] cells
Definition: Cell.cs:26
byte autotileDeco
Definition: Cell.cs:70
Room room
Definition: Cell.cs:110
bool lotShade
Definition: Cell.cs:542
bool castFloorShadow
Definition: Cell.cs:530
byte autotile
Definition: Cell.cs:68
bool HasBlock
Definition: Cell.cs:651
byte shadow
Definition: Cell.cs:78
byte _bridge
Definition: Cell.cs:48
bool isDeck
Definition: Cell.cs:518
byte shadowMod
Definition: Cell.cs:84
byte _floor
Definition: Cell.cs:36
bool hasWindow
Definition: Cell.cs:578
bool hasDoorBoat
Definition: Cell.cs:506
bool isFloating
Definition: Cell.cs:482
Cell Front
Definition: Cell.cs:137
byte _deco
Definition: Cell.cs:58
byte _decoMat
Definition: Cell.cs:60
bool IsFloorWater
Definition: Cell.cs:735
byte _floorMat
Definition: Cell.cs:38
static List< SourceObj.Row > objList
Definition: Cell.cs:22
bool blockSight
Definition: Cell.cs:326
static int Size
Definition: Cell.cs:24
byte shore
Definition: Cell.cs:76
byte topHeight
Definition: Cell.cs:86
byte minHeight
Definition: Cell.cs:88
byte _roofBlock
Definition: Cell.cs:52
byte _bridgeMat
Definition: Cell.cs:50
bool isCurtainClosed
Definition: Cell.cs:590
bool CastAmbientShadow
Definition: Cell.cs:873
byte height
Definition: Cell.cs:80
byte autotileObj
Definition: Cell.cs:74
bool isShadowed
Definition: Cell.cs:254
byte autotileBridge
Definition: Cell.cs:72
bool HasRoof
Definition: Cell.cs:656
bool isSkyFloor
Definition: Cell.cs:602
static bool openPath
Definition: Cell.cs:118
bool isSeen
Definition: Cell.cs:290
bool isSlopeEdge
Definition: Cell.cs:362
bool isShoreSand
Definition: Cell.cs:554
static bool openSight
Definition: Cell.cs:116
bool isForceFloat
Definition: Cell.cs:314
bool isSurrounded
Definition: Cell.cs:242
bool isWallEdge
Definition: Cell.cs:434
bool impassable
Definition: Cell.cs:410
static Cell Void
Definition: Cell.cs:10
Cell Right
Definition: Cell.cs:149
bool ignoreObjShadow
Definition: Cell.cs:386
byte bridgeHeight
Definition: Cell.cs:82
bool isBridgeEdge
Definition: Cell.cs:374
bool HasFullBlock
Definition: Cell.cs:825
SourceDeco.Row sourceDeco
Definition: Cell.cs:1080
bool IsNotWaterEdge
Definition: Cell.cs:696
Cell FrontRight
Definition: Cell.cs:185
bool isSurrounded4d
Definition: Cell.cs:302
virtual bool BlockSight(Cell cell)
Definition: GrowSystem.cs:129
int maxZ
Definition: MapBounds.cs:17
MapBounds bounds
Definition: Map.cs:52
virtual bool IsSnowCovered
Definition: Spatial.cs:545
static TileTypeSky Sky
Definition: TileType.cs:75
virtual byte slopeHeight
Definition: TileType.cs:241
Definition: Trait.cs:7
virtual bool IsBlockPath
Definition: Trait.cs:54
virtual bool IsBlockSight
Definition: Trait.cs:56
virtual bool IsOpenPath
Definition: Trait.cs:62
virtual bool IsFloating
Definition: Trait.cs:64
virtual bool IsOpenSight
Definition: Trait.cs:60
virtual byte WeightMod
Definition: Trait.cs:44

References _bridge, _bridgeMat, _deco, _decoMat, _floor, _floorMat, _roofBlock, EClass._zone, autotile, autotileBridge, autotileDeco, 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, sourceDeco, 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 1602 of file Cell.cs.

1603 {
1604 if (c.isChara)
1605 {
1606 if (detail != null)
1607 {
1608 detail.charas.Remove(c.Chara);
1609 }
1610 }
1611 else
1612 {
1613 if (detail != null)
1614 {
1615 detail.things.Remove(c.Thing);
1616 }
1618 {
1620 }
1621 }
1623 }
void TryDespawnDetail()
Definition: Cell.cs:1578

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 1562 of file Cell.cs.

1563 {
1564 _block = (_blockMat = (_floor = (_floorMat = (obj = (decal = (objVal = (objMat = 0)))))));
1565 bits.Bits = 0u;
1566 bits2.Bits = 0u;
1567 }
byte decal
Definition: Cell.cs:46
byte objVal
Definition: Cell.cs:42
byte _blockMat
Definition: Cell.cs:34

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

Referenced by Map.Reset().

◆ RotateAll()

void Cell.RotateAll ( )
inline

Definition at line 1529 of file Cell.cs.

1530 {
1531 bool flag = EInput.isShiftDown || Input.GetMouseButton(1);
1533 if (mouseTarget.card != null)
1534 {
1535 mouseTarget.card.Rotate(flag);
1536 return;
1537 }
1538 if (detail == null || detail.things.Count == 0)
1539 {
1540 if (HasBlock)
1541 {
1542 if (sourceBlock.tileType.CanRotate(buildMode: false))
1543 {
1544 RotateBlock((!flag) ? 1 : (-1));
1545 }
1546 }
1547 else if (HasObj)
1548 {
1549 if (sourceObj.tileType.CanRotate(buildMode: false))
1550 {
1551 RotateObj(flag, sourceObj.tileType.IsUseBlockDir);
1552 }
1553 }
1554 else if (HasFloor)
1555 {
1556 RotateFloor((!flag) ? 1 : (-1));
1557 }
1558 }
1560 }
virtual void Rotate(bool reverse=false)
Definition: Card.cs:6653
bool HasFloor
Definition: Cell.cs:653
void RotateBlock(int a)
Definition: Cell.cs:1475
bool HasObj
Definition: Cell.cs:649
void RotateObj(bool reverse=false, bool useBlockDir=false)
Definition: Cell.cs:1507
void RotateFloor(int a)
Definition: Cell.cs:1492
Definition: Core.cs:14
static new Core Instance
Definition: Core.cs:15
Scene scene
Definition: Core.cs:65
PointTarget mouseTarget
Definition: Scene.cs:135

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 1475 of file Cell.cs.

1476 {
1477 int num = blockDir;
1478 int num2 = (sourceBlock.tileType.IsWallOrFence ? 3 : sourceBlock._tiles.Length);
1479 num += a;
1480 if (num < 0)
1481 {
1482 num = num2 - 1;
1483 }
1484 if (num >= num2)
1485 {
1486 num = 0;
1488 }
1489 blockDir = num;
1490 }
bool crossWall
Definition: Cell.cs:638

References blockDir, crossWall, and sourceBlock.

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

◆ RotateFloor()

void Cell.RotateFloor ( int  a)
inline

Definition at line 1492 of file Cell.cs.

1493 {
1494 int num = floorDir;
1495 num += a;
1496 if (num < 0)
1497 {
1498 num = sourceFloor._tiles.Length - 1;
1499 }
1500 if (num >= sourceFloor._tiles.Length)
1501 {
1502 num = 0;
1503 }
1504 floorDir = num;
1505 }
int floorDir
Definition: Cell.cs:930

References floorDir, and sourceFloor.

Referenced by RotateAll().

◆ RotateObj()

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

Definition at line 1507 of file Cell.cs.

1508 {
1509 int num = (useBlockDir ? blockDir : objDir);
1510 num = ((!reverse) ? (num + 1) : (num - 1));
1511 if (num < 0)
1512 {
1513 num = sourceObj._tiles.Length - 1;
1514 }
1515 if (num >= sourceObj._tiles.Length)
1516 {
1517 num = 0;
1518 }
1519 if (useBlockDir)
1520 {
1521 blockDir = num;
1522 }
1523 else
1524 {
1525 objDir = num;
1526 }
1527 }
int objDir
Definition: Cell.cs:918

References blockDir, objDir, and sourceObj.

Referenced by RotateAll().

◆ ToString()

override string Cell.ToString ( )
inline

Definition at line 1103 of file Cell.cs.

1104 {
1105 return "Cell(" + x + "," + z + " " + matBlock?.ToString() + "/" + matFloor?.ToString() + "/" + _block + ")";
1106 }

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

◆ TryDespawnDetail()

void Cell.TryDespawnDetail ( )
inline

Definition at line 1578 of file Cell.cs.

1579 {
1580 if (detail != null && detail.TryDespawn())
1581 {
1582 detail = null;
1583 }
1584 }
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 1719 of file Cell.cs.

1720 {
1721 return EClass._map.TryGetPlant(this);
1722 }

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

◆ TryGrow()

void Cell.TryGrow ( VirtualDate  date = null)
inline

Definition at line 1695 of file Cell.cs.

1696 {
1697 growth?.TryGrow(date);
1698 }
void TryGrow(VirtualDate date)
Definition: GrowSystem.cs:326

References growth, and GrowSystem.TryGrow().

Member Data Documentation

◆ _block

◆ _blockMat

byte Cell._blockMat

Definition at line 34 of file Cell.cs.

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

◆ _bridge

◆ _bridgeMat

byte Cell._bridgeMat

Definition at line 50 of file Cell.cs.

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

◆ _deco

byte Cell._deco

Definition at line 58 of file Cell.cs.

Referenced by Recipe.Build(), BaseTileMap.DrawTile(), Refresh(), and Map.Save().

◆ _decoMat

byte Cell._decoMat

Definition at line 60 of file Cell.cs.

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

◆ _dirs

byte Cell._dirs

Definition at line 30 of file Cell.cs.

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

◆ _floor

byte Cell._floor

◆ _floorMat

byte Cell._floorMat

Definition at line 38 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 56 of file Cell.cs.

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

◆ _roofBlockMat

byte Cell._roofBlockMat

Definition at line 54 of file Cell.cs.

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

◆ autotile

byte Cell.autotile

Definition at line 68 of file Cell.cs.

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

◆ autotileBridge

byte Cell.autotileBridge

Definition at line 72 of file Cell.cs.

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

◆ autotileDeco

byte Cell.autotileDeco

Definition at line 70 of file Cell.cs.

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

◆ autotileObj

byte Cell.autotileObj

Definition at line 74 of file Cell.cs.

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

◆ bits

BitArray32 Cell.bits

Definition at line 106 of file Cell.cs.

◆ bits2

BitArray32 Cell.bits2

Definition at line 108 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 90 of file Cell.cs.

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

◆ cells

Cell [,] Cell.cells
static

Definition at line 26 of file Cell.cs.

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

◆ critter

Critter Cell.critter

Definition at line 104 of file Cell.cs.

Referenced by BaseTileMap.DrawTile().

◆ decal

◆ decoList

List<SourceDeco.Row> Cell.decoList
static

Definition at line 18 of file Cell.cs.

◆ detail

◆ DIV_LIQUID

const int Cell.DIV_LIQUID = 10
static

Definition at line 114 of file Cell.cs.

◆ DivAutotile

const int Cell.DivAutotile = 12
static

Definition at line 28 of file Cell.cs.

◆ DivStage

const int Cell.DivStage = 30
static

Definition at line 120 of file Cell.cs.

◆ effect

◆ effectList

List<SourceCellEffect.Row> Cell.effectList
static

Definition at line 20 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 92 of file Cell.cs.

Referenced by BaseTileMap.DrawTile().

◆ 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 88 of file Cell.cs.

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

◆ obj

◆ objList

List<SourceObj.Row> Cell.objList
static

Definition at line 22 of file Cell.cs.

Referenced by Refresh().

◆ objMat

byte Cell.objMat

Definition at line 44 of file Cell.cs.

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

◆ objVal

byte Cell.objVal

Definition at line 42 of file Cell.cs.

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

◆ openPath

bool Cell.openPath
staticprivate

Definition at line 118 of file Cell.cs.

Referenced by Refresh().

◆ openSight

bool Cell.openSight
staticprivate

Definition at line 116 of file Cell.cs.

Referenced by Refresh().

◆ pcSync

bool Cell.pcSync

Definition at line 112 of file Cell.cs.

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

◆ room

◆ shadow

byte Cell.shadow

Definition at line 78 of file Cell.cs.

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

◆ shadowMod

byte Cell.shadowMod

Definition at line 84 of file Cell.cs.

Referenced by Refresh().

◆ shore

byte Cell.shore

Definition at line 76 of file Cell.cs.

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

◆ Size

int Cell.Size
static

Definition at line 24 of file Cell.cs.

Referenced by Refresh().

◆ topHeight

byte Cell.topHeight

Definition at line 86 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 220 of file Cell.cs.

221 {
222 get
223 {
224 if (x <= 0 || z + 1 >= Size)
225 {
226 return Void;
227 }
228 return cells[x - 1, z + 1];
229 }
230 }

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

◆ BackRight

Cell Cell.BackRight
get

Definition at line 208 of file Cell.cs.

209 {
210 get
211 {
212 if (x + 1 >= Size || z + 1 >= Size)
213 {
214 return Void;
215 }
216 return cells[x + 1, z + 1];
217 }
218 }

Referenced by BaseTileMap.DrawTile().

◆ biome

BiomeProfile Cell.biome
get

Definition at line 1086 of file Cell.cs.

1087 {
1088 get
1089 {
1090 if (!(sourceFloor.biome != null))
1091 {
1092 return EClass._zone.biome;
1093 }
1094 return sourceFloor.biome;
1095 }
1096 }
BiomeProfile biome
Definition: Zone.cs:131

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

◆ blockDir

int Cell.blockDir
getset

◆ blockSight

bool Cell.blockSight
getset

Definition at line 325 of file Cell.cs.

326 {
327 get
328 {
329 return bits[9];
330 }
331 set
332 {
333 bits[9] = value;
334 }
335 }
BitArray32 bits
Definition: Cell.cs:106

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

◆ CanGrowWeed

bool Cell.CanGrowWeed
get

Definition at line 749 of file Cell.cs.

750 {
751 get
752 {
753 if (obj == 0 && FirstThing == null && !HasBlock && !HasRoof)
754 {
755 if (!IsFarmField)
756 {
757 if (_bridge != 0)
758 {
759 if (matBridge.category == "grass")
760 {
761 return sourceBridge.tag.Contains("weed");
762 }
763 return false;
764 }
765 if (matFloor.category == "grass")
766 {
767 return sourceFloor.tag.Contains("weed");
768 }
769 return false;
770 }
771 return true;
772 }
773 return false;
774 }
775 }
bool IsFarmField
Definition: Cell.cs:738
Thing FirstThing
Definition: Cell.cs:970

Referenced by GrowSystem.OnExceedLastStage().

◆ CastAmbientShadow

bool Cell.CastAmbientShadow
get

Definition at line 873 of file Cell.cs.

Referenced by Refresh().

◆ castFloorShadow

bool Cell.castFloorShadow
getset

Definition at line 529 of file Cell.cs.

530 {
531 get
532 {
533 return bits[28];
534 }
535 set
536 {
537 bits[28] = value;
538 }
539 }

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

◆ CastShadow

bool Cell.CastShadow
get

Definition at line 871 of file Cell.cs.

◆ Charas

List<Chara> Cell.Charas
get

Definition at line 996 of file Cell.cs.

◆ crossWall

bool Cell.crossWall
getset

Definition at line 637 of file Cell.cs.

638 {
639 get
640 {
641 return bits2[5];
642 }
643 set
644 {
645 bits2[5] = value;
646 }
647 }
BitArray32 bits2
Definition: Cell.cs:108

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

◆ fireAmount

int Cell.fireAmount
get

Definition at line 965 of file Cell.cs.

Referenced by LogicalFire.Update().

◆ FirstThing

Thing Cell.FirstThing
get

Definition at line 969 of file Cell.cs.

970 {
971 get
972 {
973 CellDetail cellDetail = detail;
974 if (cellDetail == null || cellDetail.things.Count <= 0)
975 {
976 return null;
977 }
978 return detail.things[0];
979 }
980 }

Referenced by TraitDoor.TryOpen().

◆ floorDir

int Cell.floorDir
getset

Definition at line 929 of file Cell.cs.

930 {
931 get
932 {
933 return _dirs / 32;
934 }
935 set
936 {
937 _dirs = (byte)(_dirs - floorDir * 32 + value * 32);
938 }
939 }

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

◆ Front

◆ FrontLeft

Cell Cell.FrontLeft
get

Definition at line 196 of file Cell.cs.

197 {
198 get
199 {
200 if (x <= 0 || z <= 0)
201 {
202 return Void;
203 }
204 return cells[x - 1, z - 1];
205 }
206 }

Referenced by BaseTileMap.DrawTile().

◆ FrontRight

Cell Cell.FrontRight
get

Definition at line 184 of file Cell.cs.

185 {
186 get
187 {
188 if (x + 1 >= Size || z <= 0)
189 {
190 return Void;
191 }
192 return cells[x + 1, z - 1];
193 }
194 }

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

◆ fullWall

bool Cell.fullWall
getset

Definition at line 469 of file Cell.cs.

470 {
471 get
472 {
473 return bits[23];
474 }
475 set
476 {
477 bits[23] = value;
478 }
479 }

Referenced by BaseTileMap.DrawTile().

◆ gatherCount

int Cell.gatherCount
getset

Definition at line 998 of file Cell.cs.

999 {
1000 get
1001 {
1002 if (!map.gatherCounts.ContainsKey(index))
1003 {
1004 return 0;
1005 }
1006 return map.gatherCounts[index];
1007 }
1008 set
1009 {
1010 if (value == 0)
1011 {
1012 if (map.gatherCounts.ContainsKey(index))
1013 {
1014 map.gatherCounts.Remove(index);
1015 }
1016 }
1017 else
1018 {
1019 map.gatherCounts[index] = value;
1020 }
1021 }
1022 }
Dictionary< int, int > gatherCounts
Definition: Map.cs:61

◆ growth

◆ HasBlock

◆ HasBlockOrRamp

bool Cell.HasBlockOrRamp
get

Definition at line 867 of file Cell.cs.

◆ HasBridge

◆ hasDoor

◆ hasDoorBoat

bool Cell.hasDoorBoat
getset

Definition at line 505 of file Cell.cs.

506 {
507 get
508 {
509 return bits[26];
510 }
511 set
512 {
513 bits[26] = value;
514 }
515 }

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

◆ HasFence

bool Cell.HasFence
get

Definition at line 843 of file Cell.cs.

◆ HasFire

bool Cell.HasFire
get

Definition at line 683 of file Cell.cs.

684 {
685 get
686 {
687 if (effect != null)
688 {
689 return effect.IsFire;
690 }
691 return false;
692 }
693 }
bool IsFire
Definition: CellEffect.cs:147
CellEffect effect
Definition: Cell.cs:102

Referenced by Zone.Activate(), 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 1024 of file Cell.cs.

1025 {
1026 get
1027 {
1028 if (!sourceBlock.tileType.IsFloodBlock)
1029 {
1030 return hasDoor;
1031 }
1032 return true;
1033 }
1034 }

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

◆ HasFloor

bool Cell.HasFloor
get

Definition at line 653 of file Cell.cs.

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

◆ HasFloorOrBlock

bool Cell.HasFloorOrBlock
get

Definition at line 667 of file Cell.cs.

668 {
669 get
670 {
671 if (_block == 0)
672 {
673 return _floor != 0;
674 }
675 return true;
676 }
677 }

◆ HasFullBlock

◆ HasFullBlockOrWallOrFence

bool Cell.HasFullBlockOrWallOrFence
get

Definition at line 827 of file Cell.cs.

828 {
829 get
830 {
831 if (!HasFullBlock)
832 {
833 return HasWallOrFence;
834 }
835 return true;
836 }
837 }
bool HasWallOrFence
Definition: Cell.cs:839

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

◆ HasHalfBlock

bool Cell.HasHalfBlock
get

Definition at line 865 of file Cell.cs.

◆ HasLadder

bool Cell.HasLadder
get

Definition at line 847 of file Cell.cs.

Referenced by AI_Goto.TryGoTo().

◆ HasLiquid

◆ HasObj

◆ HasRamp

◆ HasRampOrLadder

bool Cell.HasRampOrLadder
get

Definition at line 849 of file Cell.cs.

850 {
851 get
852 {
853 if (!HasRamp)
854 {
855 return HasLadder;
856 }
857 return true;
858 }
859 }
bool HasLadder
Definition: Cell.cs:847

◆ HasRoof

bool Cell.HasRoof
get

Definition at line 655 of file Cell.cs.

656 {
657 get
658 {
659 if (room != null)
660 {
661 return room.lot.idRoofStyle != 0;
662 }
663 return false;
664 }
665 }

Referenced by Chara.CanDuplicate(), 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 861 of file Cell.cs.

Referenced by TileTypeRoof.HitTest().

◆ HasStairs

bool Cell.HasStairs
get

Definition at line 863 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 577 of file Cell.cs.

578 {
579 get
580 {
581 return bits2[0];
582 }
583 set
584 {
585 bits2[0] = value;
586 }
587 }

Referenced by Refresh().

◆ ignoreObjShadow

bool Cell.ignoreObjShadow
getset

Definition at line 385 of file Cell.cs.

386 {
387 get
388 {
389 return bits[14];
390 }
391 set
392 {
393 bits[14] = value;
394 }
395 }

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

◆ impassable

bool Cell.impassable
getset

Definition at line 409 of file Cell.cs.

410 {
411 get
412 {
413 return bits[16];
414 }
415 set
416 {
417 bits[16] = value;
418 }
419 }

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

◆ index

int Cell.index
get

◆ Installed

Thing Cell.Installed
get

Definition at line 982 of file Cell.cs.

983 {
984 get
985 {
986 if (detail == null || detail.things.Count <= 0 || !detail.things[0].IsInstalled)
987 {
988 return null;
989 }
990 return detail.things[0];
991 }
992 }

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

◆ IsBlocked

bool Cell.IsBlocked
get

Definition at line 903 of file Cell.cs.

Referenced by RecipeCard.Build(), and BaseTileMap.DrawTile().

◆ isBridgeEdge

bool Cell.isBridgeEdge
getset

Definition at line 373 of file Cell.cs.

374 {
375 get
376 {
377 return bits[13];
378 }
379 set
380 {
381 bits[13] = value;
382 }
383 }

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

◆ IsBridgeWater

bool Cell.IsBridgeWater
get

Definition at line 777 of file Cell.cs.

778 {
779 get
780 {
781 if (_bridge != 0)
782 {
783 return floorList[_bridge].tileType.IsWater;
784 }
785 return false;
786 }
787 }
static List< SourceFloor.Row > floorList
Definition: Cell.cs:16

Referenced by BaseTileMap.DrawTile().

◆ isClearArea

bool Cell.isClearArea
getset

Definition at line 613 of file Cell.cs.

614 {
615 get
616 {
617 return bits2[3];
618 }
619 set
620 {
621 bits2[3] = value;
622 }
623 }

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

◆ isClearSnow

bool Cell.isClearSnow
getset

Definition at line 457 of file Cell.cs.

458 {
459 get
460 {
461 return bits[22];
462 }
463 set
464 {
465 bits[22] = value;
466 }
467 }

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 589 of file Cell.cs.

590 {
591 get
592 {
593 return bits2[1];
594 }
595 set
596 {
597 bits2[1] = value;
598 }
599 }

Referenced by Refresh().

◆ isDeck

bool Cell.isDeck
getset

Definition at line 517 of file Cell.cs.

518 {
519 get
520 {
521 return bits[27];
522 }
523 set
524 {
525 bits[27] = value;
526 }
527 }

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

◆ IsDeepWater

bool Cell.IsDeepWater
get

Definition at line 801 of file Cell.cs.

802 {
803 get
804 {
805 if (sourceSurface.tileType.IsDeepWater)
806 {
807 return !IsIceTile;
808 }
809 return false;
810 }
811 }
bool IsIceTile
Definition: Cell.cs:814
SourceFloor.Row sourceSurface
Definition: Cell.cs:1069

Referenced by CanSuffocate(), and Refresh().

◆ IsFarmField

bool Cell.IsFarmField
get

Definition at line 737 of file Cell.cs.

738 {
739 get
740 {
741 if (_bridge != 0)
742 {
743 return sourceBridge.Category.id == "floor_field";
744 }
745 return sourceFloor.Category.id == "floor_field";
746 }
747 }

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

◆ isFloating

bool Cell.isFloating
getset

Definition at line 481 of file Cell.cs.

482 {
483 get
484 {
485 return bits[24];
486 }
487 set
488 {
489 bits[24] = value;
490 }
491 }

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

◆ IsFloorWater

◆ isForceFloat

bool Cell.isForceFloat
getset

Definition at line 313 of file Cell.cs.

314 {
315 get
316 {
317 return bits[8];
318 }
319 set
320 {
321 bits[8] = value;
322 }
323 }

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

◆ isHarvested

bool Cell.isHarvested
getset

Definition at line 337 of file Cell.cs.

338 {
339 get
340 {
341 return bits[10];
342 }
343 set
344 {
345 bits[10] = value;
346 }
347 }

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

◆ IsIceTile

bool Cell.IsIceTile
get

Definition at line 813 of file Cell.cs.

814 {
815 get
816 {
818 {
819 return !isClearSnow;
820 }
821 return false;
822 }
823 }
bool isClearSnow
Definition: Cell.cs:458
Zone zone
Definition: Map.cs:87

Referenced by CharaActorPCC.OnRender().

◆ IsLotEdge

bool Cell.IsLotEdge
get

Definition at line 887 of file Cell.cs.

888 {
889 get
890 {
891 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)))
892 {
893 if (Right.room != null)
894 {
895 return Right.room.data.atrium | !Right.HasRoof;
896 }
897 return false;
898 }
899 return true;
900 }
901 }
bool atrium
Definition: AreaData.cs:66
AreaData data
Definition: BaseArea.cs:29
Cell Back
Definition: Cell.cs:161
Cell Left
Definition: Cell.cs:173

◆ isModified

bool Cell.isModified
getset

Definition at line 445 of file Cell.cs.

446 {
447 get
448 {
449 return bits[21];
450 }
451 set
452 {
453 bits[21] = value;
454 }
455 }

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

◆ IsNotWaterEdge

bool Cell.IsNotWaterEdge
get

Definition at line 695 of file Cell.cs.

696 {
697 get
698 {
699 if (!HasFullBlock && !floorList[_floor].tileType.IsWater)
700 {
701 return floorList[_floor].edge == 0;
702 }
703 return true;
704 }
705 }

Referenced by Refresh().

◆ isObjDyed

bool Cell.isObjDyed
getset

Definition at line 625 of file Cell.cs.

626 {
627 get
628 {
629 return bits2[4];
630 }
631 set
632 {
633 bits2[4] = value;
634 }
635 }

Referenced by DyeObj(), TraitSeed.MakeSeed(), TaskHarvest.OnCreateProgress(), TraitDye.OnThrowGround(), GrowSystem.PopHarvest(), and Map.Save().

◆ IsRoomEdge

bool Cell.IsRoomEdge
get

Definition at line 875 of file Cell.cs.

876 {
877 get
878 {
879 if (Front.room == room && Right.room == room)
880 {
881 return FrontRight.room != room;
882 }
883 return true;
884 }
885 }

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

◆ isSeen

bool Cell.isSeen
getset

◆ isShadowed

bool Cell.isShadowed
getset

Definition at line 253 of file Cell.cs.

254 {
255 get
256 {
257 return bits[1];
258 }
259 set
260 {
261 bits[1] = value;
262 }
263 }

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

◆ isShoreSand

bool Cell.isShoreSand
getset

Definition at line 553 of file Cell.cs.

554 {
555 get
556 {
557 return bits[30];
558 }
559 set
560 {
561 bits[30] = value;
562 }
563 }

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

◆ IsSky

bool Cell.IsSky
get

Definition at line 941 of file Cell.cs.

942 {
943 get
944 {
945 if (sourceFloor.tileType == TileType.Sky)
946 {
947 return !HasBridge;
948 }
949 return false;
950 }
951 }
bool HasBridge
Definition: Cell.cs:679

Referenced by Chara.CanMoveTo(), and IsPathBlocked().

◆ isSkyFloor

bool Cell.isSkyFloor
getset

Definition at line 601 of file Cell.cs.

602 {
603 get
604 {
605 return bits2[2];
606 }
607 set
608 {
609 bits2[2] = value;
610 }
611 }

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

◆ isSlopeEdge

bool Cell.isSlopeEdge
getset

Definition at line 361 of file Cell.cs.

362 {
363 get
364 {
365 return bits[12];
366 }
367 set
368 {
369 bits[12] = value;
370 }
371 }

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

◆ IsSnowTile

◆ isSurrounded

bool Cell.isSurrounded
getset

◆ isSurrounded4d

bool Cell.isSurrounded4d
getset

Definition at line 301 of file Cell.cs.

302 {
303 get
304 {
305 return bits[7];
306 }
307 set
308 {
309 bits[7] = value;
310 }
311 }

Referenced by Refresh().

◆ isToggleWallPillar

bool Cell.isToggleWallPillar
getset

Definition at line 565 of file Cell.cs.

566 {
567 get
568 {
569 return bits[31];
570 }
571 set
572 {
573 bits[31] = value;
574 }
575 }

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

◆ IsTopWater

◆ IsTopWaterAndNoSnow

◆ IsVoid

bool Cell.IsVoid
get

Definition at line 967 of file Cell.cs.

Referenced by Map.GetRampDir().

◆ isWallEdge

bool Cell.isWallEdge
getset

Definition at line 433 of file Cell.cs.

434 {
435 get
436 {
437 return bits[20];
438 }
439 set
440 {
441 bits[20] = value;
442 }
443 }

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

◆ isWatered

bool Cell.isWatered
getset

Definition at line 349 of file Cell.cs.

350 {
351 get
352 {
353 return bits[11];
354 }
355 set
356 {
357 bits[11] = value;
358 }
359 }

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

◆ Left

◆ liquidLv

int Cell.liquidLv
get

Definition at line 953 of file Cell.cs.

954 {
955 get
956 {
957 if (effect != null && effect.LiquidAmount != 0)
958 {
959 return (effect?.LiquidAmount ?? 0) / 3 + 1;
960 }
961 return 0;
962 }
963 }
int LiquidAmount
Definition: CellEffect.cs:174

Referenced by BaseTileMap.DrawTile().

◆ lotShade

bool Cell.lotShade
getset

Definition at line 541 of file Cell.cs.

542 {
543 get
544 {
545 return bits[29];
546 }
547 set
548 {
549 bits[29] = value;
550 }
551 }

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

◆ lotWall

bool Cell.lotWall
getset

Definition at line 493 of file Cell.cs.

494 {
495 get
496 {
497 return bits[25];
498 }
499 set
500 {
501 bits[25] = value;
502 }
503 }

Referenced by BaseTileMap.DrawTile().

◆ matBlock

◆ matBridge

◆ matDeco

SourceMaterial.Row Cell.matDeco
get

Definition at line 1042 of file Cell.cs.

Referenced by BaseTileMap.DrawTile().

◆ matFloor

◆ matObj

◆ matObj_fixed

SourceMaterial.Row Cell.matObj_fixed
get

Definition at line 1048 of file Cell.cs.

1049 {
1050 get
1051 {
1052 if (!isObjDyed)
1053 {
1054 return matList[objMat];
1055 }
1056 return sourceObj.DefaultMaterial;
1057 }
1058 }
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 1036 of file Cell.cs.

Referenced by PartialMap.Save().

◆ nonGradient

bool Cell.nonGradient
getset

Definition at line 397 of file Cell.cs.

398 {
399 get
400 {
401 return bits[15];
402 }
403 set
404 {
405 bits[15] = value;
406 }
407 }

◆ objDir

int Cell.objDir
getset

Definition at line 917 of file Cell.cs.

918 {
919 get
920 {
921 return _dirs / 4 % 8;
922 }
923 set
924 {
925 _dirs = (byte)(_dirs - objDir * 4 + value % 8 * 4);
926 }
927 }

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

◆ outOfBounds

bool Cell.outOfBounds
getset

Definition at line 421 of file Cell.cs.

422 {
423 get
424 {
425 return bits[17];
426 }
427 set
428 {
429 bits[17] = value;
430 }
431 }

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

◆ Right

◆ skipRender

bool Cell.skipRender
getset

Definition at line 277 of file Cell.cs.

278 {
279 get
280 {
281 return bits[4];
282 }
283 set
284 {
285 bits[4] = value;
286 }
287 }

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

◆ sourceBlock

◆ sourceBridge

◆ sourceDeco

SourceDeco.Row Cell.sourceDeco
get

Definition at line 1080 of file Cell.cs.

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

◆ sourceEffect

SourceCellEffect.Row Cell.sourceEffect
get

◆ sourceFloor

◆ sourceObj

◆ sourceRoofBlock

SourceBlock.Row Cell.sourceRoofBlock
get

Definition at line 1060 of file Cell.cs.

Referenced by PartialMap.Save().

◆ sourceSurface

SourceFloor.Row Cell.sourceSurface
get

◆ Things

List<Thing> Cell.Things
get

◆ TopHeight

byte Cell.TopHeight
get

Definition at line 124 of file Cell.cs.

125 {
126 get
127 {
128 if (bridgeHeight != 0)
129 {
130 return bridgeHeight;
131 }
132 return height;
133 }
134 }

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

◆ UseLowBlock

bool Cell.UseLowBlock
get

Definition at line 869 of file Cell.cs.

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


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