コード例 #1
0
 private int GetMechanoidsCount(Site site, SiteCoreOrPartParams parms)
 {
     return(PawnGroupMakerUtility.GeneratePawnKindsExample(new PawnGroupMakerParms
     {
         tile = site.Tile,
         faction = Faction.OfMechanoids,
         groupKind = PawnGroupKindDefOf.Combat,
         points = parms.threatPoints,
         seed = new int?(SleepingMechanoidsSitePartUtility.GetPawnGroupMakerSeed(parms))
     }).Count <PawnKindDef>());
 }
コード例 #2
0
        private int GetMechanoidsCount(Site site, SiteCoreOrPartParams parms)
        {
            PawnGroupMakerParms pawnGroupMakerParms = new PawnGroupMakerParms();

            pawnGroupMakerParms.tile      = site.Tile;
            pawnGroupMakerParms.faction   = Faction.OfMechanoids;
            pawnGroupMakerParms.groupKind = PawnGroupKindDefOf.Combat;
            pawnGroupMakerParms.points    = parms.threatPoints;
            pawnGroupMakerParms.seed      = SleepingMechanoidsSitePartUtility.GetPawnGroupMakerSeed(parms);
            return(PawnGroupMakerUtility.GeneratePawnKindsExample(pawnGroupMakerParms).Count());
        }
コード例 #3
0
        private IEnumerable <Pawn> GeneratePawns(GenStepParams parms, Map map)
        {
            float points = (parms.siteCoreOrPart == null) ? this.defaultPointsRange.RandomInRange : parms.siteCoreOrPart.parms.threatPoints;
            PawnGroupMakerParms pawnGroupMakerParms = new PawnGroupMakerParms();

            pawnGroupMakerParms.groupKind = PawnGroupKindDefOf.Combat;
            pawnGroupMakerParms.tile      = map.Tile;
            pawnGroupMakerParms.faction   = Faction.OfMechanoids;
            pawnGroupMakerParms.points    = points;
            if (parms.siteCoreOrPart != null)
            {
                pawnGroupMakerParms.seed = new int?(SleepingMechanoidsSitePartUtility.GetPawnGroupMakerSeed(parms.siteCoreOrPart.parms));
            }
            return(PawnGroupMakerUtility.GeneratePawns(pawnGroupMakerParms, true));
        }