Exemple #1
0
        private int GetTipAmount(Sim actor, Sim creator, Lot.MetaAutonomyType venueType, Bartending.DrinkDescription requestedDrink)
        {
            float num = 0f;

            if (venueType != Lot.MetaAutonomyType.Residential && !actor.IsSelectable)
            {
                Bartending.BarData barData;
                if (Bartending.TryGetBarData(venueType, out barData))
                {
                    float num2 = (float)Bartending.GetCostForDrink(requestedDrink, venueType);
                    float num3 = num2 * barData.PriceCapMultiplier;

                    if (num > num3)
                    {
                        creator.ShowTNSIfSelectable(Bartending.LocalizeString(creator.IsFemale, "BartenderExpensiveIngredients", new object[0]), StyledNotification.NotificationStyle.kSimTalking, actor.ObjectId, creator.ObjectId);
                    }
                    num += num2 * Bartending.GetTipMultiplierForMood(Bartending.DrinkMood.Regular);

                    float num5 = 0f;

                    if (actor.HasTrait(TraitNames.Frugal))
                    {
                        num5 *= Bartending.kTipMultiplierTraitFrugal;
                    }
                    num += num2 * num5;
                    num  = Math.Min(num, num3);
                }
                Bartending skill = creator.SkillManager.GetSkill <Bartending>(SkillNames.Bartending);
                if (skill != null && skill.LifetimeOpportunityServedDrinksCompleted)
                {
                    num *= Bartending.kLifetimeOpportunityServedTipMultiplier;
                }
            }
            return((int)num);
        }
Exemple #2
0
 public override string GetInteractionName(Sim actor, BarProfessional target, InteractionObjectPair iop)
 {
     return("Tru Blood (§" + Bartending.GetCostForDrink(DrinkDescription, target.LotCurrent.GetMetaAutonomyType) + ")");
 }