Exemple #1
0
 protected override bool CanScatterAt(IntVec3 loc, Map map)
 {
     if (!base.CanScatterAt(loc, map))
     {
         return(false);
     }
     if (!TryGetRandomValidRotation(loc, map, out Rot4 _))
     {
         return(false);
     }
     if (terrainValidationRadius > 0f)
     {
         foreach (IntVec3 item in GenRadial.RadialCellsAround(loc, terrainValidationRadius, useCenter: true))
         {
             if (item.InBounds(map))
             {
                 TerrainDef terrain = item.GetTerrain(map);
                 for (int i = 0; i < terrainValidationDisallowed.Count; i++)
                 {
                     if (terrain.HasTag(terrainValidationDisallowed[i]))
                     {
                         return(false);
                     }
                 }
             }
         }
     }
     return(true);
 }
        protected override bool CanScatterAt(IntVec3 loc, Map map)
        {
            if (!base.CanScatterAt(loc, map))
            {
                return(false);
            }
            Rot4 rot;

            if (!this.TryGetRandomValidRotation(loc, map, out rot))
            {
                return(false);
            }
            if (this.terrainValidationRadius > 0f)
            {
                foreach (IntVec3 current in GenRadial.RadialCellsAround(loc, this.terrainValidationRadius, true))
                {
                    if (current.InBounds(map))
                    {
                        TerrainDef terrain = current.GetTerrain(map);
                        for (int i = 0; i < this.terrainValidationDisallowed.Count; i++)
                        {
                            if (terrain.HasTag(this.terrainValidationDisallowed[i]))
                            {
                                return(false);
                            }
                        }
                    }
                }
                return(true);
            }
            return(true);
        }
 public bool AllowRenderingFor(TerrainDef terrain)
 {
     if (!DebugViewSettings.drawTerrainWater)
     {
         return(!terrain.HasTag("Water"));
     }
     return(true);
 }
Exemple #4
0
 public bool AllowRenderingFor(TerrainDef terrain)
 {
     return(DebugViewSettings.drawTerrainWater || !terrain.HasTag("Water"));
 }