Esempio n. 1
0
        public static Lord MakeNewCarnivalLord(Faction faction, Map map, IntVec3 spawnCentre, int durationDays, IEnumerable <Pawn> startingPawns)
        {
            // This method was checked against source.
            // It is one of the only places lords should be instantiated directly.

            var lord = new Lord()
            {
                loadID  = Find.World.uniqueIDsManager.GetNextLordID(),
                faction = faction
            };

            map.lordManager.AddLord(lord);

            foreach (var pawn in startingPawns)
            {
                lord.ownedPawns.Add(pawn);
                lord.numPawnsEverGained++;
            }

            Info.ReInitWith(lord, spawnCentre);

            var lordJob = new LordJob_EntertainColony(durationDays);

            lord.SetJob(lordJob);
            lord.GotoToil(lord.Graph.StartingToil);

            return(lord);
        }