Example #1
0
        public override bool Run()
        {
            BreedOutfit breed     = new BreedPickerDialog(Target.SimDescription.Species).Show();
            string      breedName = "";

            if (breed == null || breed.BreedLocKey == string.Empty)
            {
                Target.SimDescription.PetManager.BreedName = "";
                if (Target.IsADogSpecies)
                {
                    breedName = StringTable.GetLocalizedString("Ui/Caption/HUD/PetAdoptionInfoTooltip:DogNoBreed");
                }
                else
                {
                    breedName = StringTable.GetLocalizedString("Ui/Caption/HUD/PetAdoptionInfoTooltip:CatHorseNoBreed");
                }
            }
            else
            {
                Target.SimDescription.PetManager.BreedName = breed.BreedLocKey;
                breedName = StringTable.GetLocalizedString(breed.BreedLocKey);
            }
            BreedManager.storePetBreed(Target.SimDescription);
            StyledNotification.Show(new StyledNotification.Format(Target.FullName
                                                                  + " " + Localization.LocalizeString(Loader.sEWBreedLocalizeKey + "SetPetBreed")
                                                                  + " = " + breedName, StyledNotification.NotificationStyle.kGameMessagePositive));
            return(true);
        }
Example #2
0
 public static ListenerAction OnPlannedOutfitPet(Event e)
 {
     if (e.Actor.SimDescription.PetManager.BreedName == "")
     {
         e.Actor.SimDescription.PetManager.BreedName =
             BreedManager.retrievePetBreed(e.Actor.SimDescription.SimDescriptionId);
     }
     return(ListenerAction.Keep);
 }
Example #3
0
        public static ListenerAction OnNewOffspringPet(Event e)
        {
            Sim pet = e.TargetObject as Sim;

            if (pet.SimDescription.PetManager.BreedName == "" || pet.SimDescription.PetManager.BreedName == null)
            {
                BreedManager.setOffspringBreed(pet);
            }
            InitializePetBreed(pet);
            return(ListenerAction.Keep);
        }
Example #4
0
 public static void InitializePetBreed(Sim a)
 {
     if (a.IsPet)
     {
         a.AddInteraction(ShowPetBreed.Singleton, true);
         a.AddInteraction(SetPetBreed.Singleton, true);
         if (a.SimDescription.PetManager.BreedName != "")
         {
             BreedManager.storePetBreed(a.SimDescription);
         }
     }
 }