Esempio n. 1
0
 private static void CalculateLocationCandidates(Map map, ThingDef thingDef)
 {
     InfestationLikeCellFinder.locationCandidates.Clear();
     InfestationLikeCellFinder.CalculateTraversalDistancesToUnroofed(map);
     InfestationLikeCellFinder.CalculateClosedAreaSizeGrid(map);
     InfestationLikeCellFinder.CalculateDistanceToColonyBuildingGrid(map);
     for (int i = 0; i < map.Size.z; i++)
     {
         for (int j = 0; j < map.Size.x; j++)
         {
             IntVec3 cell    = new IntVec3(j, 0, i);
             float   scoreAt = InfestationLikeCellFinder.GetScoreAt(cell, map, thingDef);
             if (scoreAt > 0f)
             {
                 InfestationLikeCellFinder.locationCandidates.Add(new InfestationLikeCellFinder.LocationCandidate(cell, scoreAt));
             }
         }
     }
 }