Exemple #1
0
 public static void MakeupManagement(Sim sim, bool addRemove)
 {
     try
     {
         SimBuilder       builder               = new SimBuilder();
         SimDescription   simDescription        = sim.SimDescription;
         OutfitCategories currentOutfitCategory = sim.CurrentOutfitCategory;
         int currentOutfitIndex = sim.CurrentOutfitIndex;
         builder.Clear(false);
         SimOutfit currentOutfit = sim.CurrentOutfit;
         OutfitUtils.SetOutfit(builder, currentOutfit, simDescription);
         if (addRemove)
         {
             sendDebugMsg(sim.FullName + "\nAdding eyes.");
             string designPreset = CASUtils.PartDataGetPreset(VTThirstMaskPart, uint.Parse(kMaskPresetIndex));
             builder.AddPart(ThirstMask);
             if (sim.SimDescription.YoungAdultOrAbove)
             {
                 sim.BuffManager.AddElement(0xB110CC43B0C44B1C, (Origin)ResourceUtils.HashString64("ByAppearanceOfRedEyes"));
             }
             CASUtils.ApplyPresetToPart(builder, ThirstMask, designPreset);
             builder.SetPartPreset(VTThirstMaskPart, uint.Parse(kMaskPresetIndex), designPreset);
         }
         else
         {
             builder.RemovePart(ThirstMask);
             sim.BuffManager.RemoveElement(0xB110CC43B0C44B1C);
         }
         SimOutfit outfit = new SimOutfit(builder.CacheOutfit(simDescription.FullName + currentOutfitCategory.ToString() + currentOutfitIndex.ToString()));
         if (simDescription.GetOutfitCount(currentOutfitCategory) > currentOutfitIndex)
         {
             simDescription.RemoveOutfit(currentOutfitCategory, currentOutfitIndex, true);
         }
         simDescription.AddOutfit(outfit, currentOutfitCategory, currentOutfitIndex);
         if (simDescription.CreatedSim != null)
         {
             sendDebugMsg("Updated: " + currentOutfitCategory.ToString() + "-" + currentOutfitIndex.ToString());
             simDescription.CreatedSim.RefreshCurrentOutfit(false);
         }
         foreach (OutfitCategories categories2 in Enum.GetValues(typeof(OutfitCategories)))
         {
             if (categories2 != OutfitCategories.Special)
             {
                 ArrayList list = simDescription.GetCurrentOutfits()[categories2] as ArrayList;
                 if (list != null)
                 {
                     int count = list.Count;
                     for (int i = 0; i < count; i++)
                     {
                         if ((categories2 != currentOutfitCategory) || (i != currentOutfitIndex))
                         {
                             builder.Clear(false);
                             SimOutfit outfit3 = list[i] as SimOutfit;
                             OutfitUtils.SetOutfit(builder, outfit3, simDescription);
                             if (addRemove)
                             {
                                 string str2 = CASUtils.PartDataGetPreset(VTThirstMaskPart, uint.Parse(kMaskPresetIndex));
                                 builder.AddPart(ThirstMask);
                                 sim.BuffManager.AddElement(0xB110CC43B0C44B1C, (Origin)ResourceUtils.HashString64("ByAppearanceOfRedEyes"));
                                 CASUtils.ApplyPresetToPart(builder, ThirstMask, str2);
                                 builder.SetPartPreset(VTThirstMaskPart, uint.Parse(kMaskPresetIndex), str2);
                             }
                             else
                             {
                                 builder.RemovePart(ThirstMask);
                                 sim.BuffManager.RemoveElement(0xB110CC43B0C44B1C);
                             }
                             SimOutfit outfit4 = new SimOutfit(builder.CacheOutfit(simDescription.FullName + categories2.ToString() + i.ToString()));
                             if (simDescription.GetOutfitCount(categories2) > i)
                             {
                                 simDescription.RemoveOutfit(categories2, i, true);
                             }
                             simDescription.AddOutfit(outfit4, categories2, i);
                             sendDebugMsg("Updated: " + categories2.ToString() + "-" + i.ToString());
                             Sleep(0);
                         }
                     }
                 }
             }
         }
         SimOutfit outfit5 = simDescription.GetOutfit(OutfitCategories.Everyday, 0);
         if (outfit5 != null)
         {
             ThumbnailManager.GenerateHouseholdSimThumbnail(outfit5.Key, outfit5.Key.InstanceId, 0, ThumbnailSizeMask.Large | ThumbnailSizeMask.ExtraLarge | ThumbnailSizeMask.Medium | ThumbnailSizeMask.Small, ThumbnailTechnique.Default, true, false, simDescription.AgeGenderSpecies);
         }
     }
     catch (Exception exception)
     {
         SimpleMessageDialog.Show("Vampire Tweaker - Thirst Effect", sim.Name + "\nApply makeup failed!\n" + exception);
     }
 }
Exemple #2
0
 public override int GetHashCode()
 {
     return((int)ResourceUtils.HashString32(mCategory.ToString() + mIndex + mSpecialKey));
 }
 public static void SetFeet(Sim sim, bool addRemove)
 {
     try
     {
         SimBuilder       builder               = new SimBuilder();
         SimDescription   simDescription        = sim.SimDescription;
         OutfitCategories currentOutfitCategory = sim.CurrentOutfitCategory;
         int currentOutfitIndex = sim.CurrentOutfitIndex;
         builder.Clear(false);
         SimOutfit currentOutfit = sim.CurrentOutfit;
         OutfitUtils.SetOutfit(builder, currentOutfit, simDescription);
         if (addRemove)
         {
             sendDebugMsg(sim.FullName + "\nAdding feets.");
             simDescription.AddOutfit(currentOutfit, OutfitCategories.Naked);
             if (simDescription.Child)
             {
                 builder.AddPart(WolfFeetMaskChildUnisex);
             }
             if (simDescription.Teen && simDescription.IsFemale)
             {
                 builder.AddPart(WolfFeetMaskTeenFemale);
             }
             if (simDescription.Teen && simDescription.IsMale)
             {
                 builder.AddPart(WolfFeetMaskTeenMale);
             }
             if (simDescription.Adult && simDescription.YoungAdult && simDescription.IsFemale)
             {
                 builder.AddPart(WolfFeetMaskAdultFemale);
             }
             if (simDescription.Adult && simDescription.YoungAdult && simDescription.IsMale)
             {
                 builder.AddPart(WolfFeetMaskAdultMale);
             }
             if (simDescription.Elder && simDescription.IsFemale)
             {
                 builder.AddPart(WolfFeetMaskElderFemale);
             }
             if (simDescription.Elder && simDescription.IsMale)
             {
                 builder.AddPart(WolfFeetMaskElderMale);
             }
         }
         else
         {
             if (simDescription.Child)
             {
                 builder.RemovePart(WolfFeetMaskChildUnisex);
             }
             if (simDescription.Teen && simDescription.IsFemale)
             {
                 builder.RemovePart(WolfFeetMaskChildUnisex);
             }
             if (simDescription.Teen && simDescription.IsMale)
             {
                 builder.RemovePart(WolfFeetMaskTeenMale);
             }
             if (simDescription.YoungAdult && simDescription.Adult && simDescription.IsMale)
             {
                 builder.RemovePart(WolfFeetMaskAdultMale);
             }
             if (simDescription.YoungAdult && simDescription.Adult && simDescription.IsFemale)
             {
                 builder.RemovePart(WolfFeetMaskAdultFemale);
             }
             if (simDescription.Elder && simDescription.IsFemale)
             {
                 builder.RemovePart(WolfFeetMaskElderFemale);
             }
             if (simDescription.Elder && simDescription.IsMale)
             {
                 builder.RemovePart(WolfFeetMaskElderMale);
             }
         }
         SimOutfit outfit = new SimOutfit(builder.CacheOutfit(simDescription.FullName + currentOutfitCategory.ToString() + currentOutfitIndex.ToString()));
         if (simDescription.GetOutfitCount(currentOutfitCategory) > currentOutfitIndex)
         {
             simDescription.RemoveOutfit(currentOutfitCategory, currentOutfitIndex, true);
         }
         simDescription.AddOutfit(outfit, currentOutfitCategory, currentOutfitIndex);
         if (simDescription.CreatedSim != null)
         {
             sendDebugMsg("Updated: " + currentOutfitCategory.ToString() + "-" + currentOutfitIndex.ToString());
             simDescription.CreatedSim.RefreshCurrentOutfit(false);
         }
         foreach (OutfitCategories categories2 in Enum.GetValues(typeof(OutfitCategories)))
         {
             if (categories2 != OutfitCategories.Special)
             {
                 ArrayList list = simDescription.GetCurrentOutfits()[categories2] as ArrayList;
                 if (list != null)
                 {
                     int count = list.Count;
                     for (int i = 0; i < count; i++)
                     {
                         if ((categories2 != currentOutfitCategory) || (i != currentOutfitIndex))
                         {
                             builder.Clear(false);
                             SimOutfit outfit3 = list[i] as SimOutfit;
                             OutfitUtils.SetOutfit(builder, outfit3, simDescription);
                             if (addRemove)
                             {
                                 simDescription.AddOutfit(currentOutfit, OutfitCategories.Naked);
                                 if (simDescription.Child)
                                 {
                                     builder.AddPart(WolfFeetMaskChildUnisex);
                                 }
                                 if (simDescription.Teen && simDescription.IsFemale)
                                 {
                                     builder.AddPart(WolfFeetMaskTeenFemale);
                                 }
                                 if (simDescription.Teen && simDescription.IsMale)
                                 {
                                     builder.AddPart(WolfFeetMaskTeenMale);
                                 }
                                 if (simDescription.Adult && simDescription.YoungAdult && simDescription.IsFemale)
                                 {
                                     builder.AddPart(WolfFeetMaskAdultFemale);
                                 }
                                 if (simDescription.Adult && simDescription.YoungAdult && simDescription.IsMale)
                                 {
                                     builder.AddPart(WolfFeetMaskAdultMale);
                                 }
                                 if (simDescription.Elder && simDescription.IsFemale)
                                 {
                                     builder.AddPart(WolfFeetMaskElderFemale);
                                 }
                                 if (simDescription.Elder && simDescription.IsMale)
                                 {
                                     builder.AddPart(WolfFeetMaskElderMale);
                                 }
                             }
                             else
                             {
                                 if (simDescription.Child)
                                 {
                                     builder.RemovePart(WolfFeetMaskChildUnisex);
                                 }
                                 if (simDescription.Teen && simDescription.IsFemale)
                                 {
                                     builder.RemovePart(WolfFeetMaskChildUnisex);
                                 }
                                 if (simDescription.Teen && simDescription.IsMale)
                                 {
                                     builder.RemovePart(WolfFeetMaskTeenMale);
                                 }
                                 if (simDescription.YoungAdult && simDescription.Adult && simDescription.IsMale)
                                 {
                                     builder.RemovePart(WolfFeetMaskAdultMale);
                                 }
                                 if (simDescription.YoungAdult && simDescription.Adult && simDescription.IsFemale)
                                 {
                                     builder.RemovePart(WolfFeetMaskAdultFemale);
                                 }
                                 if (simDescription.Elder && simDescription.IsFemale)
                                 {
                                     builder.RemovePart(WolfFeetMaskElderFemale);
                                 }
                                 if (simDescription.Elder && simDescription.IsMale)
                                 {
                                     builder.RemovePart(WolfFeetMaskElderMale);
                                 }
                             }
                             SimOutfit outfit4 = new SimOutfit(builder.CacheOutfit(simDescription.FullName + categories2.ToString() + i.ToString()));
                             if (simDescription.GetOutfitCount(categories2) > i)
                             {
                                 simDescription.RemoveOutfit(categories2, i, true);
                             }
                             simDescription.AddOutfit(outfit4, categories2, i);
                             sendDebugMsg("Updated: " + categories2.ToString() + "-" + i.ToString());
                             Sleep(0);
                         }
                     }
                 }
             }
         }
         SimOutfit outfit5 = simDescription.GetOutfit(OutfitCategories.Everyday, 0);
         if (outfit5 != null)
         {
             ThumbnailManager.GenerateHouseholdSimThumbnail(outfit5.Key, outfit5.Key.InstanceId, 0, ThumbnailSizeMask.Large | ThumbnailSizeMask.ExtraLarge | ThumbnailSizeMask.Medium | ThumbnailSizeMask.Small, ThumbnailTechnique.Default, true, false, simDescription.AgeGenderSpecies);
         }
     }
     catch (Exception exception)
     {
         SimpleMessageDialog.Show("Werewolf Tweaker - Wolf Feet", sim.Name + "\nApply feet failed!\n" + exception);
     }
 }
Exemple #4
0
 protected static string GetOutfitName(SimDescription me, OutfitCategories category, int outfitIndex)
 {
     return(string.Concat(new object[] { me.FirstName, me.LastName, category.ToString(), outfitIndex }));
 }
        private static OutfitCategories ShowLastOutfitTuningDialog(OutfitCategories outfit)
        {
            Dictionary <string, object> regTypes = new Dictionary <string, object>();

            regTypes.Add(OutfitCategories.Career.ToString(), OutfitCategories.Career.ToString());
            regTypes.Add(OutfitCategories.Everyday.ToString(), OutfitCategories.Everyday.ToString());
            regTypes.Add(OutfitCategories.Formalwear.ToString(), OutfitCategories.Formalwear.ToString());
            regTypes.Add(OutfitCategories.Sleepwear.ToString(), OutfitCategories.Sleepwear.ToString());
            regTypes.Add(OutfitCategories.Swimwear.ToString(), OutfitCategories.Swimwear.ToString());
            regTypes.Add(OutfitCategories.Athletic.ToString(), OutfitCategories.Athletic.ToString());
            regTypes.Add(OutfitCategories.Naked.ToString(), OutfitCategories.Naked.ToString());

            object           result    = ComboSelectionDialog.Show("Outfit When Show Ends", regTypes, outfit.ToString());
            OutfitCategories newOutfit = outfit;

            if (result is string)
            {
                newOutfit = (OutfitCategories)Enum.Parse(typeof(OutfitCategories), result as string, true);
            }
            return(newOutfit);
        }
Exemple #6
0
 protected static string GetOutfitName(SimDescription me, OutfitCategories category, int outfitIndex)
 {
     return string.Concat(new object[] { me.FirstName, me.LastName, category.ToString(), outfitIndex });
 }