コード例 #1
0
ファイル: SavedOutfit.cs プロジェクト: yakoder/NRaas
            public static int CountOutfits(SimDescriptionCore sim, bool alternate)
            {
                int count = 0;

                foreach (OutfitCategories category in Enum.GetValues(typeof(OutfitCategories)))
                {
                    if (category == OutfitCategories.Supernatural)
                    {
                        continue;
                    }

                    count += sim.GetOutfitCount(category);
                }

                return(count);
            }
コード例 #2
0
ファイル: CASParts.cs プロジェクト: yakoder/NRaas
        public static void CheckIndex(SimDescriptionCore sim, Logger log)
        {
            int count = sim.GetOutfitCount(OutfitCategories.Career);

            if (count <= 0)
            {
                count = 1;
            }

            if ((sim.CareerOutfitIndex < 0) || (sim.CareerOutfitIndex >= count))
            {
                sim.CareerOutfitIndex = count - 1;

                if (log != null)
                {
                    log(" Index Reset: " + sim.FullName);
                }
            }
        }
コード例 #3
0
ファイル: CASParts.cs プロジェクト: yakoder/NRaas
 public Key(OutfitCategories category, SimDescriptionCore sim)
 {
     mCategory   = category;
     mIndex      = sim.GetOutfitCount(category);
     mSpecialKey = null;
 }
コード例 #4
0
ファイル: CASParts.cs プロジェクト: yakoder/NRaas
 public static string GetOutfitName(SimDescriptionCore sim, OutfitCategories category, bool maternity)
 {
     return(GetOutfitName(sim, new Key(category, sim.GetOutfitCount(category)), maternity));
 }
コード例 #5
0
ファイル: CASParts.cs プロジェクト: Robobeurre/NRaas
 public Key(OutfitCategories category, SimDescriptionCore sim)
 {
     mCategory = category;
     mIndex = sim.GetOutfitCount(category);
     mSpecialKey = null;
 }
コード例 #6
0
ファイル: CASParts.cs プロジェクト: Robobeurre/NRaas
        public static void CheckIndex(SimDescriptionCore sim, Logger log)
        {
            int count = sim.GetOutfitCount(OutfitCategories.Career);
            if (count <= 0)
            {
                count = 1;
            }

            if ((sim.CareerOutfitIndex < 0) || (sim.CareerOutfitIndex >= count))
            {
                sim.CareerOutfitIndex = count - 1;

                if (log != null)
                {
                    log(" Index Reset: " + sim.FullName);
                }
            }
        }
コード例 #7
0
ファイル: CASParts.cs プロジェクト: Robobeurre/NRaas
 public static string GetOutfitName(SimDescriptionCore sim, OutfitCategories category, bool maternity)
 {
     return GetOutfitName(sim, new Key(category, sim.GetOutfitCount(category)), maternity);
 }
コード例 #8
0
ファイル: SavedOutfit.cs プロジェクト: Robobeurre/NRaas
            public static int CountOutfits(SimDescriptionCore sim, bool alternate)
            {
                int count = 0;

                foreach (OutfitCategories category in Enum.GetValues(typeof(OutfitCategories)))
                {
                    if (category == OutfitCategories.Supernatural) continue;

                    count += sim.GetOutfitCount(category);
                }

                return count;
            }