Esempio n. 1
0
 public static void ChangeSimToTowelOutfit(Sim s, bool romantic)
 {
     if ((s.CurrentOutfitCategory != OutfitCategories.Singed) && !(s.Service is GrimReaper))
     {
         if ((romantic) && (Woohooer.Settings.mNakedOutfitMassage))
         {
             s.SwitchToOutfitWithSpin(Sim.ClothesChangeReason.GoingToBathe);
         }
         else
         {
             SimOutfit      outfit         = null;
             SimDescription simDescription = s.SimDescription;
             ResourceKey    key            = ResourceKey.CreateOutfitKey(OutfitUtils.GetAgePrefix(simDescription.Age, true) + OutfitUtils.GetGenderPrefix(simDescription.Gender) + "MassageTowel", 0x2000000);
             outfit = OutfitUtils.CreateOutfitForSim(simDescription, key, OutfitCategories.SkinnyDippingTowel, true);
             if (outfit != null)
             {
                 s.SwitchToOutfitWithSpin(outfit.Key);
             }
             else
             {
                 // Custom
                 s.SwitchToOutfitWithSpin(Sim.ClothesChangeReason.Force, OutfitCategories.Swimwear);
             }
         }
     }
 }
Esempio n. 2
0
        public override bool Run()
        {
            Definition definition = InteractionDefinition as Definition;

            string type = definition.mType.ToString();

            string      uniformName;
            ResourceKey key;

            if (definition.mType == ServiceType.GrimReaper)
            {
                uniformName = "YmDeath";

                key = ResourceKey.CreateOutfitKey(uniformName, 0);
            }
            else
            {
                if (!ServiceNPCSpecifications.TryGetUniform(type, Actor.SimDescription.Gender, out key, out uniformName))
                {
                    return(false);
                }
            }

            SimOutfit uniform = new SimOutfit(key);

            if (uniform.IsValid)
            {
                SimOutfit outfit = new SimOutfit(OutfitUtils.ApplyUniformToOutfit(Actor.SimDescription.GetOutfit(OutfitCategories.Everyday, 0), uniform, Actor.SimDescription, "NRaas.Disguise.Run"));
                if (outfit.IsValid)
                {
                    Actor.SimDescription.AddOutfit(outfit, OutfitCategories.Career, true);

                    Actor.PushSwitchToOutfitInteraction(Sim.ClothesChangeReason.GoingToWork, OutfitCategories.Career);
                }
            }

            return(true);
        }