Esempio n. 1
0
    internal virtual void GenerateName(ref EmployeeGeneratedData generatedData)
    {
        NameLists employeeNames = names;

        generatedData.name = (generatedData.gender == "female") ? employeeNames.PersonName(PersonNames.FemaleFirstName) :
                             employeeNames.PersonName(PersonNames.MaleFirstName);
        generatedData.name += " " + employeeNames.PersonName(PersonNames.LastName);
    }
Esempio n. 2
0
        public void SetRandomName(string gender, string race)
        {
            NameLists name     = new NameLists();
            var       FullName = name.SetRandomName(gender, race);

            SetFirstName(FullName[0]);
            SetLastName(FullName[1]);
        }
Esempio n. 3
0
    /// <summary>
    /// Get the current <see cref="NameLists"/>.
    /// </summary>
    /// <returns>The base <see cref="NameLists"/> if no mod is present, otherwise the one from the mod.</returns>
    public NameLists GetNameLists()
    {
        var modNames = ModHolder.Instance.GetNameLists();

        if (modNames != null)
        {
            if (modNames.UseExclusively)
            {
                return(modNames);
            }
            else
            {
                if (cachedCombinedList == null)
                {
                    cachedCombinedList = ScriptableObject.CreateInstance <NameLists>();
                    cachedCombinedList.firstNamesMale.AddRange(DefaultNameLists.firstNamesMale);
                    cachedCombinedList.firstNamesMale.AddRange(modNames.firstNamesMale);

                    cachedCombinedList.firstNamesFemale.AddRange(DefaultNameLists.firstNamesFemale);
                    cachedCombinedList.firstNamesFemale.AddRange(modNames.firstNamesFemale);

                    cachedCombinedList.lastNames.AddRange(DefaultNameLists.lastNames);
                    cachedCombinedList.lastNames.AddRange(modNames.lastNames);

                    cachedCombinedList.companyNames.AddRange(DefaultNameLists.companyNames);
                    cachedCombinedList.companyNames.AddRange(modNames.companyNames);

                    cachedCombinedList.passwordApplications.AddRange(DefaultNameLists.passwordApplications);
                    cachedCombinedList.passwordApplications.AddRange(modNames.passwordApplications);

                    cachedCombinedList.universities.AddRange(DefaultNameLists.universities);
                    cachedCombinedList.universities.AddRange(modNames.universities);

                    cachedCombinedList.webServices.AddRange(DefaultNameLists.webServices);
                    cachedCombinedList.webServices.AddRange(modNames.webServices);

                    cachedCombinedList.software.AddRange(DefaultNameLists.software);
                    cachedCombinedList.software.AddRange(modNames.software);

                    cachedCombinedList.towns.AddRange(DefaultNameLists.towns);
                    cachedCombinedList.towns.AddRange(modNames.towns);

                    cachedCombinedList.countries.AddRange(DefaultNameLists.countries);
                    cachedCombinedList.countries.AddRange(modNames.countries);

                    cachedCombinedList.institutions.AddRange(DefaultNameLists.institutions);
                    cachedCombinedList.institutions.AddRange(modNames.institutions);
                }

                return(cachedCombinedList);
            }
        }
        else
        {
            return(DefaultNameLists);
        }
    }
Esempio n. 4
0
 public EmployeeFactory()
 {
     contentHub      = ContentHub.Instance;
     teamManager     = TeamManager.Instance;
     missionManager  = MissionManager.Instance;
     gameTime        = GameTime.GameTime.Instance;
     employeeManager = EmployeeManager.Instance;
     names           = contentHub.GetNameLists();
     skills          = contentHub.GetSkillSet().keys;
     allPurpSkillDef = ContentHub.Instance.GeneralPurposeSkill;
     empMaterial     = contentHub.DefaultEmpMaterial;
     empUiMaterial   = contentHub.DefaultEmpUiMaterial;
     InitColorSwapTex();
     spriteColors            = new Color[colorSwapTex.width];
     specialEmployeesToSpawn = new List <EmployeeDefinition>();
     EmployeeSpecials.AddRange(ModHolder.Instance.GetCustomSpecials());
 }