示例#1
0
            public float CalculateScore(InteractionObjectPair interactionObjectPair, Sims3.Gameplay.Autonomy.Autonomy autonomy)
            {
                float num = 0f;

                mAutonomyBook = null;
                foreach (Book book in TabletEx.GetBooksInTown(autonomy.Actor, false, true, true))
                //foreach (Book book in Tablet.GetBooksOnMyLot(autonomy.Actor, false, true))
                {
                    // Custom
                    ReadBookData data;
                    if (autonomy.Actor.ReadBookDataList.TryGetValue(book.Data.ID, out data))
                    {
                        if (data.TimesRead > 0)
                        {
                            continue;
                        }
                    }

                    GreyedOutTooltipCallback greyedOutTooltipCallback = null;
                    if (book.TestReadBook(autonomy.Actor, true, ref greyedOutTooltipCallback))
                    {
                        float interestInBook = BookEx.GetInterestInBook(autonomy.Actor, book);
                        if (interestInBook > num)
                        {
                            mAutonomyBook = book;
                            num           = interestInBook;
                        }
                    }
                }

                if (mAutonomyBook == null)
                {
                    return(0f);
                }

                if (autonomy.Actor.HasTrait(TraitNames.ComputerWhiz))
                {
                    num *= Tablet.kCompWhizMultiplier;
                }
                else if (autonomy.Actor.HasTrait(TraitNames.AntiTV))
                {
                    num *= Tablet.kTechnophobeMultiplier;
                }

                return(num * autonomy.CalculateScoreForObjectInteraction(interactionObjectPair));
            }
示例#2
0
 public override float CalculateScore(InteractionObjectPair interactionObjectPair, Sims3.Gameplay.Autonomy.Autonomy autonomy)
 {
     return(CalculateScoreWithInteractionTuning(interactionObjectPair, autonomy,
                                                EWFightPet.kSocialTuningScoreWeight, EWFightPet.kInteractionTuningScoreWeight));
 }