コード例 #1
0
        public string GetAlias(SimDescription sim)
        {
            string result;

            if (!mAlias.TryGetValue(sim.SimDescriptionId, out result))
            {
                if (GameUtils.IsInstalled(ProductVersion.EP5))
                {
                    if (sim.IsFemale)
                    {
                        result = SimUtils.GetRandomPetName(false, CASAgeGenderFlags.Cat, true);
                    }
                    else
                    {
                        result = SimUtils.GetRandomPetName(true, CASAgeGenderFlags.Dog, true);
                    }
                }
                else
                {
                    result = SimUtils.GetRandomGivenName(!sim.IsFemale, GameUtils.GetCurrentWorld());
                }

                mAlias.Add(sim.SimDescriptionId, result);
            }

            return(result);
        }
コード例 #2
0
ファイル: NameListBooter.cs プロジェクト: yakoder/NRaas
        private static void LoadPetFirstNames(bool isFemale, CASAgeGenderFlags species, Dictionary <string, bool> names)
        {
            for (int i = 0; i < 1000; i++)
            {
                string name = SimUtils.GetRandomPetName(!isFemale, species, true);

                names[name] = true;
            }
        }