示例#1
0
            public override bool Test(Sim a, Computer target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                Journalism journalism = OmniCareer.Career <Journalism>(a.Occupation);

                return((target.IsComputerUsable(a, true, false, isAutonomous) && (journalism != null)) && journalism.CanWriteReview());
            }
示例#2
0
            public override void AddInteractions(InteractionObjectPair iop, Sim actor, Computer target, List <InteractionObjectPair> results)
            {
                Journalism job = OmniCareer.Career <Journalism>(actor.Occupation);

                if ((target.IsComputerUsable(actor, true, false, false) && (job != null)) && job.CanWriteReview())
                {
                    foreach (Journalism.ReviewedRabbitHole hole in job.RabbitHolesReviewed)
                    {
                        if ((hole.ReviewCompletion == 0f) || ((hole.ReviewCompletion < 100f) && !hole.IsReviewNegative))
                        {
                            string[] path = new string[] { Computer.LocalizeString("Writing", new object[0x0]), Computer.LocalizeString("GoodReview", new object[0x0]) };
                            results.Add(new InteractionObjectPair(new Definition(job.GetLocalizedEventName(hole.EventWatched), path, hole, false), iop.Target));
                        }

                        if ((hole.ReviewCompletion == 0f) || ((hole.ReviewCompletion < 100f) && hole.IsReviewNegative))
                        {
                            string[] strArray2 = new string[] { Computer.LocalizeString("Writing", new object[0x0]), Computer.LocalizeString("BadReview", new object[0x0]) };
                            results.Add(new InteractionObjectPair(new Definition(job.GetLocalizedEventName(hole.EventWatched), strArray2, hole, true), iop.Target));
                        }
                    }
                }
            }