Ejemplo n.º 1
0
        private static void FindMutaniteCommonalityOnMap()
        {
            List <Thing> mineablesOnMap = Find.CurrentMap.listerThings.AllThings
                                          .Where(t => t.def.building?.mineableThing != null)
                                          .ToList();
            List <Thing> mutaniteOnMap = mineablesOnMap.Where(t => t.def.defName == "Mutonite")
                                         .ToList();
            ThingCategoryDef chunkCat = ThingCategoryDefOf.Chunks;

            List <Thing> totalOres = mineablesOnMap.Where(t => !chunkCat.ContainedInThisOrDescendant(t.def.building.mineableThing))
                                     .ToList();

            Log.Message($"Mutonite:{mutaniteOnMap.Count}\tOres:{totalOres.Count}\tAll Chunks:{mineablesOnMap.Count}");
        }