public override bool Test(Sim a, BarProfessional target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { if (isAutonomous) { return(false); } return(true); if (a.SimDescription.AssignedRole is Bartending.Bartender && a.SimDescription.AssignedRole.RoleGivingObject != target) { return(false); } if (a.IsSelectable) { if (isAutonomous) { return(false); } if (target.LotCurrent.IsCommunityLot && !target.LotCurrent.IsOpenVenue()) { return(false); } } if (!Bartending.CanWorkAsBartendender(a, target.LotCurrent)) { greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(BarProfessional.LocalizeString("BarTendHomeBarTakeOverGreyedOut", new object[0])); return(false); } return((a.IsSelectable && (target.mBartender == null || !target.mBartender.IsSelectable)) || target.mBartender == null); }
public override bool Test(Sim actor, BarProfessional target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback) { SimDescription theActor = actor.SimDescription; if (theActor != null) { if (theActor.IsVampire == false) { return(false); } } if (!target.IsBartenderAvailable()) { return(false); } if (actor == target.mBartender) { return(false); } if (target.LotCurrent.IsResidentialLot) { return(false); } if (isAutonomous) { if (BarProfessional.IsRunningBarInteraction(actor)) { return(false); } if (target.mBartender != null && !Bartending.CanWorkAsBartendender(target.mBartender, target.LotCurrent, true)) { return(false); } if (Bartending.HasTabOpen(actor, target.LotCurrent)) { return(false); } } if (DrinkDescription != null) { int num = BarProfessional.GetCost(DrinkDescription, target.LotCurrent.GetMetaAutonomyType, actor, target) * 1; if (num > actor.FamilyFunds) { greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(BarProfessional.LocalizeString("NotEnoughMoney", new object[0])); return(false); } } return(true); }