Ejemplo n.º 1
0
 public static void BiomeAnimalsSpawnChances()
 {
     DebugOutputsEcology.BiomeAnimalsInternal(delegate(PawnKindDef k, BiomeDef b)
     {
         float num = b.CommonalityOfAnimal(k);
         if (num == 0f)
         {
             return(string.Empty);
         }
         float f = num / DefDatabase <PawnKindDef> .AllDefs.Sum((PawnKindDef ki) => b.CommonalityOfAnimal(ki));
         return(f.ToStringPercent("F1"));
     });
 }
Ejemplo n.º 2
0
        public static void AnimalWildCountsOnMap()
        {
            Map map = Find.CurrentMap;
            IEnumerable <PawnKindDef> arg_9A_0 = from k in DefDatabase <PawnKindDef> .AllDefs
                                                 where k.race != null && k.RaceProps.Animal && DebugOutputsEcology.ExpectedAnimalCount(k, map.Biome) > 0f
                                                 orderby DebugOutputsEcology.ExpectedAnimalCount(k, map.Biome) descending
                                                 select k;

            TableDataGetter <PawnKindDef>[] expr_3E = new TableDataGetter <PawnKindDef> [3];
            expr_3E[0] = new TableDataGetter <PawnKindDef>("animal", (PawnKindDef k) => k.defName);
            expr_3E[1] = new TableDataGetter <PawnKindDef>("expected count on map (inaccurate)", (PawnKindDef k) => DebugOutputsEcology.ExpectedAnimalCount(k, map.Biome).ToString("F2"));
            expr_3E[2] = new TableDataGetter <PawnKindDef>("actual count on map", (PawnKindDef k) => (from p in map.mapPawns.AllPawnsSpawned
                                                                                                      where p.kindDef == k
                                                                                                      select p).Count <Pawn>().ToString());
            DebugTables.MakeTablesDialog <PawnKindDef>(arg_9A_0, expr_3E);
        }
Ejemplo n.º 3
0
 public static void BiomeAnimalsTypicalCounts()
 {
     DebugOutputsEcology.BiomeAnimalsInternal((PawnKindDef k, BiomeDef b) => DebugOutputsEcology.ExpectedAnimalCount(k, b).ToStringEmptyZero("F2"));
 }
 private static string <BiomeAnimalsTypicalCounts> m__14(PawnKindDef k, BiomeDef b)
 {
     return(DebugOutputsEcology.ExpectedAnimalCount(k, b).ToStringEmptyZero("F2"));
 }