Ejemplo n.º 1
0
        public void FinalizeInit(FactionFC factionFc)
        {
            this.factionFc = factionFc;
            militaryUtil   = factionFc.militaryCustomizationUtil;
            faction        = DefDatabase <FactionDef> .GetNamed("PColony");

            faction.pawnGroupMakers = emptyList.ListFullCopy();

            WorldSettlementTraderTracker.reloadTraderKind();
        }
Ejemplo n.º 2
0
        public void FinalizeInit(FactionFC factionFc)
        {
            this.factionFc = factionFc;
            militaryUtil   = factionFc.militaryCustomizationUtil;
            faction        = DefDatabase <FactionDef> .GetNamed("PColony");

            faction.pawnGroupMakers = new List <PawnGroupMaker>
            {
                new PawnGroupMaker
                {
                    kindDef = PawnGroupKindDefOf.Combat
                },
                new PawnGroupMaker
                {
                    kindDef = PawnGroupKindDefOf.Trader
                },
                new PawnGroupMaker
                {
                    kindDef = PawnGroupKindDefOf.Settlement
                },
                new PawnGroupMaker
                {
                    kindDef = PawnGroupKindDefOf.Peaceful
                }
            };

            foreach (PawnKindDef pawnKindDef in DefDatabase <PawnKindDef> .AllDefsListForReading.Where(kind =>
                                                                                                       kind.RaceProps.packAnimal))
            {
                faction.pawnGroupMakers[1].carriers.Add(new PawnGenOption {
                    kind = pawnKindDef, selectionWeight = 1
                });
            }

            List <string> races = new List <string>();

            foreach (PawnKindDef def in DefDatabase <PawnKindDef> .AllDefsListForReading.Where(def =>
                                                                                               def.race.race.intelligence == Intelligence.Humanlike &
                                                                                               !races.Contains(def.race.label) && def.race.BaseMarketValue != 0))
            {
                if (def.race.label == "Human" && def.LabelCap != "Colonist")
                {
                    continue;
                }
                races.Add(def.race.label);
                SetAllow(def.race, true);
            }

            WorldSettlementTraderTracker.reloadTraderKind();
        }
Ejemplo n.º 3
0
        public void FinalizeInit(FactionFC factionFc)
        {
            this.factionFc = factionFc;
            militaryUtil   = factionFc.militaryCustomizationUtil;
            faction        = DefDatabase <FactionDef> .GetNamed("PColony");

            faction.pawnGroupMakers = emptyList.ListFullCopy();

            if (AllowedDefCount == 0)
            {
                SetAllow(DefDatabase <PawnKindDef> .AllDefsListForReading.First(def => def.IsHumanlikeWithLabelRace()).race, true);
            }

            RefreshAnimalRaces();
            RefreshHumanRaces();

            WorldSettlementTraderTracker.reloadTraderKind();
        }
Ejemplo n.º 4
0
 //Useless parameter to only reset when reset instead of when loaded
 public RaceThingFilter(FactionFC factionFc)
 {
     this.factionFc = factionFc;
     militaryUtil   = factionFc.militaryCustomizationUtil;
     faction        = DefDatabase <FactionDef> .GetNamed("PColony");
 }