Пример #1
0
        public static void CarpoolUpdate(Scenario paramScenario, ScenarioFrame frame)
        {
            CareerUpdateScenario scenario = paramScenario as CareerUpdateScenario;

            Occupation job = scenario.Job;

            if ((SimTypes.IsSelectable(scenario.Sim)) &&
                (scenario.GetValue <AllowCarpoolOption, bool>(scenario.Sim)) &&
                (!scenario.Lots.HasPersonalVehicle(scenario.Sim)))
            {
                CareerUpdateScenario.SchedulingSimData data = scenario.Scheduling;

                if (!data.mScheduled)
                {
                    job.RescheduleCarpool();
                    data.mScheduled = true;

                    scenario.IncStat("Scheduled");
                }
            }
            else if (CarpoolEnabled(job))
            {
                job.RemoveCarpool();
                job.mbCarpoolEnabled           = false;
                scenario.Scheduling.mScheduled = false;

                if (SimTypes.IsSelectable(scenario.Sim))
                {
                    scenario.IncStat("Dropped Active");
                }
                else
                {
                    scenario.IncStat("Dropped Inactive");
                }
            }
        }
Пример #2
0
 protected CareerUpdateScenario(CareerUpdateScenario scenario)
     : base (scenario)
 { }
Пример #3
0
 protected CareerUpdateScenario(CareerUpdateScenario scenario)
     : base(scenario)
 {
 }