예제 #1
0
        public override void Generate(Map map)
        {
            CellRect around;
            IntVec3  near;

            if (!SiteGenStepUtility.TryFindRootToSpawnAroundRectOfInterest(out around, out near, map))
            {
                return;
            }
            List <Pawn> list = new List <Pawn>();

            foreach (Pawn current in this.GeneratePawns(map))
            {
                IntVec3 loc;
                if (!SiteGenStepUtility.TryFindSpawnCellAroundOrNear(around, near, map, out loc))
                {
                    Find.WorldPawns.PassToWorld(current, PawnDiscardDecideMode.Discard);
                    break;
                }
                GenSpawn.Spawn(current, loc, map);
                list.Add(current);
            }
            if (!list.Any <Pawn>())
            {
                return;
            }
            LordMaker.MakeNewLord(Faction.OfMechanoids, new LordJob_SleepThenAssaultColony(Faction.OfMechanoids, Rand.Bool), map, list);
            for (int i = 0; i < list.Count; i++)
            {
                list[i].jobs.EndCurrentJob(JobCondition.InterruptForced, true);
            }
        }
        public override void Generate(Map map)
        {
            CellRect rectToDefend = default(CellRect);
            IntVec3  root         = default(IntVec3);

            if (SiteGenStepUtility.TryFindRootToSpawnAroundRectOfInterest(out rectToDefend, out root, map))
            {
                this.SpawnTrigger(rectToDefend, root, map);
            }
        }
        public override void Generate(Map map, GenStepParams parms)
        {
            CellRect rectToDefend;
            IntVec3  root;

            if (SiteGenStepUtility.TryFindRootToSpawnAroundRectOfInterest(out rectToDefend, out root, map))
            {
                this.SpawnTrigger(rectToDefend, root, map);
            }
        }