private void CheckVisualOrPathCostChange(IntVec3 c, float oldDepth, float newDepth) { if (!Mathf.Approximately(oldDepth, newDepth)) { if (Mathf.Abs(oldDepth - newDepth) > 0.15f || Rand.Value < 0.0125f) { this.map.mapDrawer.MapMeshDirty(c, (Verse.MapMeshFlag)ExtensionMethods.MapMeshFlag.Goo, true, false); this.map.mapDrawer.MapMeshDirty(c, (Verse.MapMeshFlag)ExtensionMethods.MapMeshFlag.Goo, true, false); } else if (newDepth == 0f) { this.map.mapDrawer.MapMeshDirty(c, (Verse.MapMeshFlag)ExtensionMethods.MapMeshFlag.Goo, true, false); } if (XenomorphHiveUtility.GetGooCategory(oldDepth) != XenomorphHiveUtility.GetGooCategory(newDepth)) { this.map.pathGrid.RecalculatePerceivedPathCostAt(c); } } }
public GooCategory GetCategory(IntVec3 c) { return(XenomorphHiveUtility.GetGooCategory(this.GetDepth(c))); }