예제 #1
0
 protected virtual bool CanScatterAt(IntVec3 loc, Map map)
 {
     if (this.extraNoBuildEdgeDist > 0 && loc.CloseToEdge(map, this.extraNoBuildEdgeDist + 10))
     {
         return(false);
     }
     if (this.minEdgeDist > 0 && loc.CloseToEdge(map, this.minEdgeDist))
     {
         return(false);
     }
     if (this.NearUsedSpot(loc, this.minSpacing))
     {
         return(false);
     }
     if ((map.Center - loc).LengthHorizontalSquared < this.minDistToPlayerStart * this.minDistToPlayerStart)
     {
         return(false);
     }
     if (this.spotMustBeStandable && !loc.Standable(map))
     {
         return(false);
     }
     if (this.validators != null)
     {
         for (int i = 0; i < this.validators.Count; i++)
         {
             if (!this.validators[i].Allows(loc, map))
             {
                 return(false);
             }
         }
     }
     return(true);
 }
예제 #2
0
 public static bool InNoZoneEdgeArea(this IntVec3 c, Map map)
 {
     return(c.CloseToEdge(map, 5));
 }
예제 #3
0
 public static bool InNoBuildEdgeArea(this IntVec3 c, Map map)
 {
     return(c.CloseToEdge(map, 10));
 }