Exemple #1
0
 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 static void AddSnowRadialPostfix(IntVec3 center, Map map, float radius, float depth)
        {
            //    Log.Message(string.Format("AddSnowRadial center: {0}, radius: {1}, depth: {2}", center, radius, depth));
            MapComponent_HiveGrid _HiveGrid = map.GetComponent <MapComponent_HiveGrid>();

            if (_HiveGrid != null)
            {
                //    Log.Message(string.Format("AddSnowRadial _HiveGrid != null center: {0}, radius: {1}, depth: {2}", center, radius, depth));
                XenomorphHiveUtility.AddHiveRadial(center, map, radius, depth);
            }
            //    Log.Message(string.Format("AddSnowRadial center: {0}, radius: {1}, depth: {2}", center, radius, depth));
            MapComponent_GooGrid _GooGrid = map.GetComponent <MapComponent_GooGrid>();

            if (_GooGrid != null)
            {
                //    Log.Message(string.Format("AddSnowRadial _HiveGrid != null center: {0}, radius: {1}, depth: {2}", center, radius, depth));
                XenomorphHiveUtility.AddGooRadial(center, map, radius, depth);
            }
        }
        // Token: 0x0600268A RID: 9866 RVA: 0x00124ABC File Offset: 0x00122EBC
        public static void Notify_HiveLikeDespawned(HiveLike hivelike, Map map)
        {
            int num = GenRadial.NumCellsInRadius(2f);

            for (int i = 0; i < num; i++)
            {
                IntVec3 c = hivelike.Position + GenRadial.RadialPattern[i];
                if (c.InBounds(map))
                {
                    List <Thing> thingList = c.GetThingList(map);
                    for (int j = 0; j < thingList.Count; j++)
                    {
                        if (thingList[j].Faction == hivelike.OfFaction && !XenomorphHiveUtility.AnyHiveLikePreventsClaiming(thingList[j]))
                        {
                            thingList[j].SetFaction(null, null);
                        }
                    }
                }
            }
        }
Exemple #4
0
 public GooCategory GetCategory(IntVec3 c)
 {
     return(XenomorphHiveUtility.GetGooCategory(this.GetDepth(c)));
 }