protected void Core_ScatterAt(IntVec3 c, Map map, int stackCount = 1)
        {
            GenStep_Settlement gs = new GenStep_Settlement();

            //gs.ForceScatterAt(c, map);
            gs.ReflectCall("ScatterAt", c, map, stackCount);

            return;



            //int randomInRange = GenStep_Settlement.SettlementSizeRange.RandomInRange;
            //int randomInRange2 = GenStep_Settlement.SettlementSizeRange.RandomInRange;
            //CellRect rect = new CellRect(c.x - randomInRange / 2, c.z - randomInRange2 / 2, randomInRange, randomInRange2);
            //Faction faction = (map.ParentFaction != null && map.ParentFaction != Faction.OfPlayer) ? map.ParentFaction : Find.FactionManager.RandomEnemyFaction(false, false, true, TechLevel.Undefined);
            //rect.ClipInsideMap(map);
            //ResolveParams resolveParams = default(ResolveParams);
            //resolveParams.rect = rect;
            //resolveParams.faction = faction;
            //BaseGen.globalSettings.map = map;
            //BaseGen.globalSettings.minBuildings = 1;
            //BaseGen.globalSettings.minBarracks = 1;
            //BaseGen.symbolStack.Push("settlement", resolveParams);
            //BaseGen.Generate();
        }
        protected void Core_ScatterAt(IntVec3 c, Map map, GenStepParams genStepParms, int stackCount = 1)
        {
            GenStep_Settlement gs = new GenStep_Settlement();

            gs.ForceScatterAt(c, map);

            //gs.ReflectCall("ScatterAt", c, map, genStepParms, stackCount);

            return;
        }
        public override void PostMapGenerate(Map map)
        {
            if (Find.TickManager.TicksGame < 10f)
            {
                IntRange SettlementSizeRange = new IntRange(38, 16);
                int      randomInRange       = SettlementSizeRange.RandomInRange;
                int      randomInRange2      = SettlementSizeRange.RandomInRange;
                IntVec3  c = map.Center;
                c.x -= 30;
                c.y -= 10;
                CellRect rect = new CellRect(c.x - randomInRange / 2, c.z - randomInRange2 / 2, randomInRange, randomInRange2);
                rect.ClipInsideMap(map);

                ResolveParams resolveParams = default(ResolveParams);
                resolveParams.rect    = rect;
                resolveParams.faction = Find.FactionManager.AllFactions.ToList().Find(f => f.def.techLevel <= TechLevel.Medieval && !f.defeated && !f.Hidden && f.HostileTo(Faction.OfPlayer));
                resolveParams.settlementPawnGroupPoints = 500f;
                BaseGen.globalSettings.map          = map;
                BaseGen.globalSettings.minBuildings = 1;
                BaseGen.globalSettings.minBarracks  = 1;
                BaseGen.symbolStack.Push("settlement", resolveParams, null);
                if (resolveParams.faction != null && resolveParams.faction == Faction.OfEmpire)
                {
                    BaseGen.globalSettings.minThroneRooms = 1;
                    BaseGen.globalSettings.minLandingPads = 1;
                }
                BaseGen.Generate();
                if (resolveParams.faction != null && resolveParams.faction == Faction.OfEmpire && BaseGen.globalSettings.landingPadsGenerated == 0)
                {
                    CellRect cellRect;
                    GenStep_Settlement.GenerateLandingPadNearby(resolveParams.rect, map, resolveParams.faction, out cellRect);
                }

                this.UnfogBuildingsInRect(map, rect);
                this.SpawnThingPostBaseGen(ThingDefOf.Gold, 150, map, rect);
                this.SpawnThingPostBaseGen(ThingDefOf.Silver, 300, map, rect);
            }
        }