Exemplo n.º 1
0
        public static void TranslateVanilla()
        {
            NameBank nameBank = PawnNameDatabaseShuffled.BankOf(PawnNameCategory.HumanStandard);

            nameBank.Clear();
            foreach (ShuffledNameDef curDef in DefDatabase <ShuffledNameDef> .AllDefs)
            {
                nameBank.AddNames(curDef.slot, curDef.gender, curDef.shuffledNames);
            }
            nameBank.ErrorCheck();
        }
Exemplo n.º 2
0
        public static void Setup()
        {
            if (ModsConfig.ActiveModsInLoadOrder.Any(mod => mod.Name.Contains("[RF] Editable Pawn Names")))
            {
                detectedREPN = true;
            }
            if (Controller.Settings.useLiteMode.Equals(false))
            {
                foreach (KeyValuePair <string, Backstory> story in BackstoryDatabase.allBackstories)
                {
                    if (story.Key.Equals("ColonySettler43"))
                    {
                        break;
                    }
                    REB_Initializer.REB_Backstories.Add(story.Key, story.Value);
                    if (story.Value.slot == BackstorySlot.Childhood)
                    {
                        if (story.Value.shuffleable.Equals(true))
                        {
                            childCountHAR++;
                        }
                        else
                        {
                            childNSCountHAR++;
                        }
                    }
                    else
                    {
                        if (story.Value.shuffleable.Equals(true))
                        {
                            adultCountHAR++;
                        }
                        else
                        {
                            adultNSCountHAR++;
                        }
                    }
                }
                BackstoryDatabase.allBackstories.Clear();
                BackstoryDatabase.allBackstories = REB_Backstories;
            }
            Log.Message("||========================================");
            Log.Message("|| Setting up Editable Backstories (EB)");
            Log.Message("||========================================");
            if (Controller.Settings.useLiteMode.Equals(true))
            {
                Log.Message("|| 'Lite Mode' in Use.");
                Log.Message("|| Vanilla Backstory Database *NOT* Cleared.");
                Log.Message("|| EB Backstories Added to Vanilla Backstory Database:");
                Log.Message("||    Childhood Backstories (shuffleable): " + childCount);
                Log.Message("||    Childhood Backstories (non-shuffleable): " + childNSCount);
                Log.Message("||    Adulthood Backstories (shuffleable): " + adultCount);
                Log.Message("||    Adulthood Backstories (non-shuffleable): " + adultNSCount);
                Log.Message("||========================================");
            }
            else
            {
                Log.Message("|| Vanilla Backstory Database Cleared.");
                Log.Message("|| Backstories in EB Backstory Database:");
                Log.Message("||    Childhood Backstories (shuffleable): " + childCount);
                Log.Message("||    Childhood Backstories (non-shuffleable): " + childNSCount);
                Log.Message("||    Adulthood Backstories (shuffleable): " + adultCount);
                Log.Message("||    Adulthood Backstories (non-shuffleable): " + adultNSCount);
                Log.Message("|| Humanoid Alien Races (HAR) Backstories Added to REB Database:");
                Log.Message("||    HAR Childhood Backstories (shuffleable): " + childCountHAR);
                Log.Message("||    HAR Childhood Backstories (non-shuffleable): " + childNSCountHAR);
                Log.Message("||    HAR Adulthood Backstories (shuffleable): " + adultCountHAR);
                Log.Message("||    HAR Adulthood Backstories (non-shuffleable): " + adultNSCountHAR);
                Log.Message("||========================================");
            }
            if (detectedREPN.Equals(true))
            {
                Log.Message("|| \"Editable Pawn Names\" (EPN) Detected.");
                Log.Message("|| Names Added to EPN Name Database:");
                Log.Message("||    Full Names (with bios): " + fullBioCount);
                Log.Message("||========================================");
            }
            else
            {
                Log.Message("|| Vanilla Name Database *NOT* Cleared.");
                Log.Message("|| Names Added to Vanilla Name Database:");
                Log.Message("||    First Names: " + firstCount);
                Log.Message("||    Nicknames: " + nickCount);
                Log.Message("||    Last Names: " + lastCount);
                Log.Message("||    Full Names (without bios): " + fullCount);
                Log.Message("||    Full Names (with bios): " + fullBioCount);
                Log.Message("||========================================");
            }
            NameBank nameBank = PawnNameDatabaseShuffled.BankOf(PawnNameCategory.HumanStandard);

            if (NamesFirstMale != null)
            {
                nameBank.AddNames(PawnNameSlot.First, Gender.Male, NamesFirstMale);
            }
            if (NamesFirstFemale != null)
            {
                nameBank.AddNames(PawnNameSlot.First, Gender.Female, NamesFirstFemale);
            }
            if (NamesNicksMale != null)
            {
                nameBank.AddNames(PawnNameSlot.Nick, Gender.Male, NamesNicksMale);
            }
            if (NamesNicksFemale != null)
            {
                nameBank.AddNames(PawnNameSlot.Nick, Gender.Female, NamesNicksFemale);
            }
            if (NamesNicksUnisex != null)
            {
                nameBank.AddNames(PawnNameSlot.Nick, Gender.None, NamesNicksUnisex);
            }
            if (NamesLast != null)
            {
                nameBank.AddNames(PawnNameSlot.Last, Gender.None, NamesLast);
            }
        }