// Methods public override string GetInteractionName(Sim a, Stadium target, InteractionObjectPair interaction) { Journalism job = OmniCareer.Career <Journalism>(a.Occupation); if ((job != null) && job.CanReviewRabbitHole(target)) { return(LocalizeString(a.SimDescription, "ReviewGame", new object[0x0])); } if (FamilyMemberOfSportsPlayer(a, false) == null) { return(LocalizeString(a.SimDescription, "InteractionName", new object[] { Stadium.AttendGame.kCostToAttendGame })); } return(LocalizeString(a.SimDescription, "FreeInteractionName", new object[0x0])); }
public override bool InRabbitHole() { try { SetMovieGenre(); if (Actor.IsSelectable) { Target.PlayMovieGenreMusic(mMovieGenre); } Journalism journalism = OmniCareer.Career <Journalism>(Actor.Occupation); bool isReviewing = false; if (journalism != null) { isReviewing = journalism.CanReviewRabbitHole(Target); } if (!InRabbitholePreLoop(isReviewing)) { return(false); } StartStages(); BeginCommodityUpdates(); bool succeeded = DoLoop(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached)); EndCommodityUpdates(succeeded); if (succeeded) { Target.PostAttendShow(Actor); if (isReviewing) { journalism.RabbitHolesReviewed.Add(new Journalism.ReviewedRabbitHole(Target, Target.ShowType)); } } ShowVenue.ApplyMovieBuff(mMovieGenre, Actor); return(succeeded); } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); return(false); } }
public override void AddInteractions(InteractionObjectPair iop, Sim actor, Restaurant target, List <InteractionObjectPair> results) { try { int breakfastLunchBrunchCost = target.RestaurantTuning.BreakfastLunchBrunchCost; if (Food.GetCurrentMealTime() == Recipe.MealTime.Dinner) { breakfastLunchBrunchCost = target.RestaurantTuning.DinnerCost; } int costForSim = target.GetCostForSim(actor, breakfastLunchBrunchCost); Journalism job = OmniCareer.Career <Journalism>(actor.Occupation); if ((job != null) && job.CanReviewRabbitHole(target)) { Definition definition = new Definition(Restaurant.EatType.Review, EatHere.LocalizeString("ReviewRestaurant", new object[0x0]), new string[] { EatHere.LocalizeString("EatHere", new object[0x0]) }, 0x0, target); results.Add(new InteractionObjectPair(definition, target)); } } catch (Exception e) { Common.Exception(actor, target, e); } }
public override bool InRabbitHole() { try { Journalism job = OmniCareer.Career <Journalism>(Actor.Occupation); bool flag = (job != null) && job.CanReviewRabbitHole(Target); if (!flag) { Sim sim = FamilyMemberOfSportsPlayer(Actor, false); if (sim != null) { if (base.Actor == sim) { SimpleMessageDialog.Show(LocalizeString(Actor.SimDescription, "FreeGameTitle", new object[0x0]), LocalizeString(sim.SimDescription, "FreeGameForSportsPlayer", new object[] { sim })); } else { SimpleMessageDialog.Show(LocalizeString(Actor.SimDescription, "FreeGameTitle", new object[0x0]), LocalizeString(sim.SimDescription, "FreeGame", new object[] { base.Actor, sim })); } } else { if (Actor.FamilyFunds < Stadium.AttendGame.kCostToAttendGame) { return(false); } Actor.ModifyFunds(-(int)Stadium.AttendGame.kCostToAttendGame); } } ConfigureInteraction(); StartStages(); BeginCommodityUpdates(); bool succeeded = false; try { succeeded = DoLoop(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached), new Interaction <Sim, Stadium> .InsideLoopFunction(WatchGameLoop), null); } finally { EndCommodityUpdates(succeeded); } if (succeeded) { EventTracker.SendEvent(new AttendedShowEvent(ShowVenue.ShowTypes.kStadiumGame, Actor)); EventTracker.SendEvent(EventTypeId.kWatchedStadiumGame, Actor, Target); ChildUtils.AddBuffToParentAndChild(Actor, BuffNames.SawGreatGame, (Origin)(0x8bfc0021188986e0L)); if (flag) { job.RabbitHolesReviewed.Add(new Journalism.ReviewedRabbitHole(Target, ShowVenue.ShowTypes.kStadiumGame)); } } return(succeeded); } catch (Exception e) { Common.Exception(Actor, Target, e); return(false); } }