예제 #1
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            Computer computer = ManagerLot.GetUsableComputer(Sim);

            if (computer == null)
            {
                IncStat("No Computer");
                return(false);
            }

            Career occupation = Sim.Occupation as Career;

            if (!occupation.CanWriteReport())
            {
                if (Sim.Occupation is LawEnforcement)
                {
                    LawEnforcement career = Sim.Occupation as LawEnforcement;

                    if (!career.CanInterview())
                    {
                        IncStat("Police Level Fail");
                        return(false);
                    }

                    foreach (SimDescription sim in Sims.Adults)
                    {
                        if (career.HasSimBeenInterviewed(sim))
                        {
                            continue;
                        }

                        career.SimInterviewed(sim);
                        break;
                    }
                }
                else if (Sim.Occupation is Journalism)
                {
                    Journalism career = Sim.Occupation as Journalism;

                    if (!career.CanInterview())
                    {
                        IncStat("Journalism Level Fail");
                        return(false);
                    }

                    foreach (SimDescription sim in Sims.Adults)
                    {
                        if (career.HasSimBeenInterviewed(sim))
                        {
                            continue;
                        }

                        career.SimInterviewed(sim);
                        break;
                    }
                }
            }

            return(Situations.PushInteraction <Computer>(this, Sim, computer, Computer.WriteReport.Singleton));
        }
예제 #2
0
        protected override bool PrivateUpdate(ScenarioFrame frame)
        {
            base.PrivateUpdate(frame);

            Computer computer = ManagerLot.GetUsableComputer(Sim);

            if (computer == null)
            {
                IncStat("No Computer");
                return(false);
            }

            return(Situations.PushInteraction(this, Sim, computer, HackEx.Singleton));
        }