Пример #1
0
            public static bool PublicTest(Sim actor, GameObject target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if (TravelUtil.PlayerMadeTravelRequest)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("PlayerMadeTravelRequest");
                    return(false);
                }

                if ((target.Repairable != null) && target.Repairable.Broken)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("Broken");
                    return(false);
                }

                if (!TimePortal.sTimeTravelerHasBeenSummoned)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("sTimeTravelerHasBeenSummoned");
                    return(false);
                }

                if (target.InUse && !target.IsActorUsingMe(actor))
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("InUse");
                    return(false);
                }

                CauseEffectService instance = CauseEffectService.GetInstance();

                if ((instance != null) && !instance.ShouldShowTimeAlmanacButton())
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("ShouldShowTimeAlmanacButton");
                    return(false);
                }

                if (actor.BuffManager.HasElement(BuffNames.Ensorcelled))
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("Ensorcelled");
                    return(false);
                }

                if (GameUtils.IsFutureWorld() && (actor.Household.Sims.Count != 0x1))
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("Multiple");
                    return(false);
                }

                // Custom
                if (!TravelerSpace.Helpers.TravelUtilEx.CanSimTriggerTravelToFutureWorld(actor, true, ref greyedOutTooltipCallback))
                {
                    return(false);
                }
                return(true);
            }
Пример #2
0
        public static void RemoveMSD(ulong id)
        {
            MiniSimDescription.RemoveMSD(id);

            if (FutureDescendantService.sPersistableData != null)
            {
                if (FutureDescendantService.sPersistableData.DescendantHouseholdsMap != null)
                {
                    FutureDescendantService.sPersistableData.DescendantHouseholdsMap.Remove(id);
                }
            }

            CauseEffectService instance = CauseEffectService.GetInstance();

            if (instance != null)
            {
                if (CauseEffectService.sPersistableData != null)
                {
                    if (CauseEffectService.sPersistableData.TimeTravelerSimID == id)
                    {
                        CauseEffectService.sPersistableData.TimeTravelerSimID = 0;
                    }
                }

                List <ITimeStatueUiData> timeStatueData = instance.GetTimeAlmanacTimeStatueData();
                if (timeStatueData != null)
                {
                    foreach (ITimeStatueUiData data in timeStatueData)
                    {
                        TimeStatueRecordData record = data as TimeStatueRecordData;
                        if (record == null)
                        {
                            continue;
                        }

                        if (record.mRecordHolderId == id)
                        {
                            record.mRecordHolderId = 0;
                        }
                    }
                }
            }
        }
Пример #3
0
 public void SwitchActiveState()
 {
     if (this.State != TimePortal.PortalState.Inactive)
     {
         this.State = TimePortal.PortalState.Inactive;
         return;
     }
     if (CauseEffectService.GetInstance().GetCurrentCauseEffectWorldState() == CauseEffectWorldState.kUtopiaState)
     {
         this.State = TimePortal.PortalState.Rainbow;
         return;
     }
     if (CauseEffectService.GetInstance().GetCurrentCauseEffectWorldState() == CauseEffectWorldState.kDystopiaState)
     {
         this.State = TimePortal.PortalState.Distopia;
         return;
     }
     this.State = TimePortal.PortalState.Active;
 }
Пример #4
0
            protected override void OnPerform()
            {
                if (!mSimGuids.Contains(mActor.SimDescription.SimDescriptionId))
                {
                    mSimGuids.Add(mActor.SimDescription.SimDescriptionId);
                }

                ForeignVisitorsSituation.ForceKillForeignVisitorsSituation();
                HolographicProjectionSituation.ForceKillHolographicVisitorsSituation();
                Camera.SetView(CameraView.MapView, false, true);

                // Custom
                CleanUpReservedVehicles(mActor, mFollowers);

                if (mPortal != null)
                {
                    mPortal.StopActiveFX();
                }

                // Custom
                GameStatesEx.TravelToVacationWorld(WorldName.FutureWorld, mSimGuids, 0x0, 0x0);
                CauseEffectService.GetInstance().SetDepartureTimePortal(mPortal.ObjectId);
            }
Пример #5
0
        public void OnWorldLoadFinished()
        {
            Overwatch.Log("CleanupCauseEffect");

            CauseEffectService instance = CauseEffectService.GetInstance();

            if (instance != null)
            {
                ulong timeTravelerSimID = instance.GetTimeTravelerSimID();
                if (MiniSimDescription.Find(timeTravelerSimID) == null)
                {
                    CauseEffectService.sPersistableData.TimeTravelerSimID = 0;

                    Overwatch.Log(" Removed Corrupt Time Traveler Referece");
                }

                List <ITimeStatueUiData> timeStatueData = instance.GetTimeAlmanacTimeStatueData();
                if (timeStatueData != null)
                {
                    foreach (ITimeStatueUiData data in timeStatueData)
                    {
                        TimeStatueRecordData record = data as TimeStatueRecordData;
                        if (record == null)
                        {
                            continue;
                        }

                        if (MiniSimDescription.Find(record.mRecordHolderId) == null)
                        {
                            record.mRecordHolderId = 0;

                            Overwatch.Log(" Removed Corrupt Record Holder Referece");
                        }
                    }
                }
            }
        }
Пример #6
0
            public static bool PublicTest(Sim actor, GameObject target, bool isAutonomous, ref GreyedOutTooltipCallback greyedOutTooltipCallback)
            {
                if ((target.Repairable != null) && target.Repairable.Broken)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("Broken");
                    return(false);
                }

                if (TravelUtil.PlayerMadeTravelRequest)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("PlayerMadeTravelRequest");
                    return(false);
                }

                if (target.InUse && !target.IsActorUsingMe(actor))
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("InUse");
                    return(false);
                }

                CauseEffectService instance = CauseEffectService.GetInstance();

                if ((instance != null) && !instance.ShouldShowTimeAlmanacButton())
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("ShouldShowTimeAlmanacButton");
                    return(false);
                }

                if (actor.BuffManager.HasElement(BuffNames.Ensorcelled))
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("Ensorcelled");
                    return(false);
                }

                if (actor.Household.Sims.Count <= 0x1)
                {
                    greyedOutTooltipCallback = Common.DebugTooltip("Single");
                    return(false);
                }

                // Custom
                if (!TravelerSpace.Helpers.TravelUtilEx.CanSimTriggerTravelToFutureWorld(actor, true, ref greyedOutTooltipCallback))
                {
                    return(false);
                }

                if (GameUtils.IsFutureWorld())
                {
                    foreach (Sim sim in Households.AllSims(actor.Household))
                    {
                        // Custom
                        if ((sim != actor) && !TravelerSpace.Helpers.TravelUtilEx.CanSimTriggerTravelToFutureWorld(sim, true, ref greyedOutTooltipCallback))
                        {
                            //greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(actor.IsFemale, TimePortal.sLocalizationKey + ":UnfitForTravel", new object[] { actor }));
                            return(false);
                        }
                    }
                }
                else
                {
                    Common.StringBuilder result = new Common.StringBuilder();

                    List <Sim> list = new List <Sim>();
                    foreach (Sim sim2 in Households.AllSims(actor.Household))
                    {
                        // Custom
                        if ((sim2 != actor) && TravelerSpace.Helpers.TravelUtilEx.CanSimTriggerTravelToFutureWorld(sim2, true, ref greyedOutTooltipCallback))
                        {
                            if (greyedOutTooltipCallback != null)
                            {
                                result += Common.NewLine + greyedOutTooltipCallback();
                            }

                            list.Add(sim2);
                        }
                    }

                    if (list.Count == 0x0)
                    {
                        greyedOutTooltipCallback = InteractionInstance.CreateTooltipCallback(Localization.LocalizeString(actor.IsFemale, TimePortal.sLocalizationKey + ":UnfitForTravel", new object[] { actor }) + Common.NewLine + result);
                        return(false);
                    }
                }
                return(true);
            }
Пример #7
0
        public override bool Run()
        {
            try
            {
                if (!TimePortal.sTimeTravelerHasBeenSummoned && Actor.CreateRoute().PlanToSlot(Target, Slot.RoutingSlot_0).Succeeded())
                {
                    if (!TimeTravelerSituation.Create(Actor.LotHome, Actor.ObjectId, Target.ObjectId))
                    {
                        return(false);
                    }
                    CauseEffectService.OpportunityPortal = Target;
                    mTimeTravlerArrivalHandled           = false;
                }
                if ((Target.InUse && !Target.IsActorUsingMe(Actor)) || !Actor.RouteToSlot(Target, Slot.RoutingSlot_0, false))
                {
                    return(false);
                }
                if (Actor.HasExitReason(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached)))
                {
                    return(false);
                }

                Definition interactionDefinition = InteractionDefinition as Definition;
                if (Target.Active)
                {
                    interactionDefinition.curState = TimePortal.PortalState.Active;
                }
                else
                {
                    interactionDefinition.curState = TimePortal.PortalState.Inactive;
                }

                Actor.SkillManager.AddElement(SkillNames.Future);
                StandardEntry(!Target.IsActorUsingMe(Actor));
                BeginCommodityUpdates();
                Target.mTimeToStepBack = false;
                EnterStateMachine("timeportal", "Enter", "x");
                SetActor("portal", Target);
                mCurrentStateMachine.AddOneShotScriptEventHandler(0x65, SwitchActiveState);
                mCurrentStateMachine.AddOneShotScriptEventHandler(0x66, PositionTimeTraveler);
                AnimateSim("Mess With");
                if (!TimePortal.sTimeTravelerHasBeenSummoned)
                {
                    Common.DebugNotify("A");

                    mCurrentStateMachine.RequestState(false, "x", "FirstTimeReact");
                    emergencyStopWatch = StopWatch.Create(StopWatch.TickStyles.Seconds);
                    int num = 0x2d;

                    mTimeTraveler = CauseEffectService.GetInstance().GetTimeTraveler();
                    while ((mTimeTraveler == null) && (emergencyStopWatch.GetElapsedTime() < num))
                    {
                        SpeedTrap.Sleep(0x1);

                        // Custom
                        SimDescription simDesc = SimDescription.Find(CauseEffectService.sPersistableData.TimeTravelerSimID);
                        if (simDesc == null)
                        {
                            CauseEffectService.sPersistableData.TimeTravelerSimID = 0;
                            CauseEffectService.GetInstance().RequestTimeTravelerSimDesc(Household.NpcHousehold);
                        }
                        else
                        {
                            mTimeTraveler = Instantiation.PerformOffLot(simDesc, Target.LotCurrent, null);
                        }
                    }

                    Common.DebugNotify("B");

                    if (mTimeTraveler != null)
                    {
                        InteractionQueue interactionQueue = mTimeTraveler.InteractionQueue;
                        mLinkedInteraction            = TimePortal.BeSummoned.Singleton.CreateInstance(Actor, mTimeTraveler, new InteractionPriority(InteractionPriorityLevel.CriticalNPCBehavior), false, false) as TimePortal.BeSummoned;
                        mLinkedInteraction.SyncTarget = Actor;
                        interactionQueue.AddNext(mLinkedInteraction);
                        Actor.SynchronizationRole   = Sim.SyncRole.Initiator;
                        Actor.SynchronizationTarget = mTimeTraveler;
                        Actor.SynchronizationLevel  = Sim.SyncLevel.Routed;
                        if (Actor.WaitForSynchronizationLevelWithSim(mTimeTraveler, Sim.SyncLevel.Started, 40f))
                        {
                            Common.DebugNotify("C");

                            SetActorAndEnter("y", mTimeTraveler, "TTEnter");
                            AnimateJoinSims("TimeTravelerExit");
                            Actor.SynchronizationLevel = Sim.SyncLevel.Completed;

                            TimeTravelerSituation situation = ServiceSituation.FindServiceSituationInvolving(mTimeTraveler) as TimeTravelerSituation;
                            if (situation != null)
                            {
                                situation.OnAppearComplete(mTimeTraveler, 0f);

                                while (!Actor.HasExitReason(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached)))
                                {
                                    Actor.LoopIdle();
                                    SpeedTrap.Sleep(0xa);
                                }
                            }
                            else
                            {
                                Target.ActorsUsingMe.Clear();

                                TimePortal.sTimeTravelerHasBeenSummoned = true;
                            }
                        }
                        else
                        {
                            AnimateSim("Exit");
                        }

                        Common.DebugNotify("D");

                        mTimeTravlerArrivalHandled = true;
                    }
                    else
                    {
                        AnimateSim("Exit");
                    }
                }
                else
                {
                    if (!GameUtils.IsFutureWorld())
                    {
                        MiniSimDescription simDesc = MiniSimDescription.Find(CauseEffectService.sPersistableData.TimeTravelerSimID);
                        if (simDesc == null)
                        {
                            CauseEffectService.sPersistableData.TimeTravelerSimID = 0;
                            CauseEffectService.GetInstance().RequestTimeTravelerSimDesc(Household.NpcHousehold);
                        }
                    }

                    AnimateSim("Exit");
                    Vector3 v = Target.Position + ((Vector3)(2f * Target.ForwardVector));
                    Actor.RouteToPoint(v);
                    Actor.RouteTurnToFace(Target.Position);
                }

                EndCommodityUpdates(true);
                StandardExit();
                if (Target.Active)
                {
                    EventTracker.SendEvent(EventTypeId.kInspectedTimePortal, Actor);
                }

                return(true);
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, e);
            }
            finally
            {
                TravelUtil.PlayerMadeTravelRequest = false;
                //Sims3.Gameplay.Gameflow.Singleton.EnableSave(this);
            }

            return(false);
        }
Пример #8
0
            public static void Perform()
            {
                Dictionary <ulong, bool> taxiDrivers = new Dictionary <ulong, bool>();
                List <ulong>             paps        = new List <ulong>();

                if ((CarNpcManager.Singleton != null) && (CarNpcManager.Singleton.NpcDriversManager != null))
                {
                    for (int i = 0; i < CarNpcManager.Singleton.NpcDriversManager.mDescPools.Length; i++)
                    {
                        Stack <SimDescription> stack = CarNpcManager.Singleton.NpcDriversManager.mDescPools[i];

                        if (stack == null)
                        {
                            continue;
                        }

                        NpcDriversManager.NpcDrivers type = (NpcDriversManager.NpcDrivers)(i + 0x95d01441);

                        while (stack.Count > 10)
                        {
                            SimDescription sim = stack.Pop();

                            try
                            {
                                AttemptServiceDisposal(sim, false, "Too Many " + type);
                            }
                            catch (Exception e)
                            {
                                Common.Exception(sim, e);
                            }
                        }

                        foreach (SimDescription sim in stack)
                        {
                            if (taxiDrivers.ContainsKey(sim.SimDescriptionId))
                            {
                                continue;
                            }

                            taxiDrivers.Add(sim.SimDescriptionId, true);
                        }
                    }
                }

                Dictionary <ulong, bool> statueSims = new Dictionary <ulong, bool>();

                CauseEffectService instance = CauseEffectService.GetInstance();

                if (instance != null)
                {
                    statueSims[instance.GetTimeTravelerSimID()] = true;

                    List <ITimeStatueUiData> timeStatueData = instance.GetTimeAlmanacTimeStatueData();
                    if (timeStatueData != null)
                    {
                        foreach (ITimeStatueUiData data in timeStatueData)
                        {
                            TimeStatueRecordData record = data as TimeStatueRecordData;
                            if (record == null)
                            {
                                continue;
                            }

                            statueSims[record.mRecordHolderId] = true;
                        }
                    }
                }

                foreach (SimDescription sim in new List <SimDescription> (Households.All(Household.NpcHousehold)))
                {
                    try
                    {
                        if (SimTypes.IsDead(sim))
                        {
                            continue;
                        }

                        if (taxiDrivers.ContainsKey(sim.SimDescriptionId))
                        {
                            continue;
                        }

                        CommonCorrections(sim);

                        if (SimTypes.InServicePool(sim, ServiceType.GrimReaper))
                        {
                            continue;
                        }

                        if (statueSims.ContainsKey(sim.SimDescriptionId))
                        {
                            continue;
                        }

                        uint spanLevel = 0;
                        OptionsModel.GetOptionSetting("AgingInterval", out spanLevel);

                        float averageElderAge = AgingManager.Singleton.GetAverageSimLifespanInDays((int)spanLevel);

                        ServiceType type = ServiceType.None;
                        if (sim.CreatedByService != null)
                        {
                            type = sim.CreatedByService.ServiceType;
                        }

                        if (AgingManager.Singleton.GetCurrentAgeInDays(sim) > averageElderAge)
                        {
                            if (sim.LotHome == null)
                            {
                                bool isRole = sim.AssignedRole != null;
                                AttemptServiceDisposal(sim, true, "Too Old " + (!isRole ? type.ToString() : sim.AssignedRole.Type.ToString()));
                            }
                        }

                        if (sim.AssignedRole != null && sim.AssignedRole is RolePaparazzi)
                        {
                            paps.Add(sim.SimDescriptionId);
                        }

                        if (sim.AssignedRole != null)
                        {
                            continue;
                        }

                        if (SimTypes.IsOccult(sim, OccultTypes.ImaginaryFriend))
                        {
                            bool found = false;
                            foreach (ImaginaryDoll doll in Sims3.Gameplay.Queries.GetObjects <ImaginaryDoll>())
                            {
                                if (sim.SimDescriptionId == doll.mLiveStateSimDescId)
                                {
                                    found = true;
                                    break;
                                }
                            }

                            if (found)
                            {
                                continue;
                            }

                            AttemptServiceDisposal(sim, false, "Imaginary");
                        }
                        else if (SimTypes.IsOccult(sim, OccultTypes.Genie))
                        {
                            bool found = false;
                            foreach (GenieLamp lamp in Sims3.Gameplay.Queries.GetObjects <GenieLamp>())
                            {
                                if (sim == lamp.mGenieDescription)
                                {
                                    found = true;
                                    break;
                                }
                            }

                            if (found)
                            {
                                continue;
                            }

                            AttemptServiceDisposal(sim, false, "Genie");
                        }
                        else if (sim.IsBonehilda)
                        {
                            bool found = false;
                            foreach (BonehildaCoffin coffin in Sims3.Gameplay.Queries.GetObjects <BonehildaCoffin>())
                            {
                                if (sim == coffin.mBonehilda)
                                {
                                    found = true;
                                    break;
                                }
                            }

                            if (found)
                            {
                                continue;
                            }

                            AttemptServiceDisposal(sim, false, "BoneHilda");
                        }
                        else if ((sim.AssignedRole == null) && (!SimTypes.InServicePool(sim)))
                        {
                            AttemptServiceDisposal(sim, false, "No Purpose");
                        }
                        else if ((type != ServiceType.None) && (sim.Age & ServiceNPCSpecifications.GetAppropriateAges(type.ToString())) == CASAgeGenderFlags.None)
                        {
                            AttemptServiceDisposal(sim, false, "Wrong Age " + type);
                        }
                        else if (!ServiceNPCSpecifications.ShouldUseServobot(type.ToString()) && sim.IsEP11Bot)
                        {
                            AttemptServiceDisposal(sim, false, "Not EP11 Bot " + type);
                        }
                    }
                    catch (Exception e)
                    {
                        Common.Exception(sim, e);
                    }
                }

                // kill extra paps
                if (paps.Count > Register.Settings.mMaximumPaparazzi)
                {
                    int count = paps.Count;
                    while (count > Register.Settings.mMaximumPaparazzi && count > 0)
                    {
                        SimDescription sim = SimDescription.Find(paps[0]);
                        if (sim != null)
                        {
                            AttemptServiceDisposal(sim, false, "Too many Paparazzi");
                        }

                        paps.Remove(paps[0]);
                        count = count - 1;
                    }
                }

                foreach (SimDescription sim in new List <SimDescription> (Households.All(Household.PetHousehold)))
                {
                    try
                    {
                        if (SimTypes.IsDead(sim))
                        {
                            continue;
                        }

                        CommonCorrections(sim);

                        if ((sim.IsDeer) || (sim.IsRaccoon))
                        {
                            if (sim.AssignedRole == null)
                            {
                                AttemptServiceDisposal(sim, false, "Roleless");
                            }
                            else if (sim.Elder)
                            {
                                AttemptServiceDisposal(sim, true, "Elder");
                            }
                        }
                        else
                        {
                            bool        noPool;
                            PetPoolType pool = SimTypes.GetPetPool(sim, out noPool);

                            if ((!noPool) && (pool == PetPoolType.None))
                            {
                                AttemptServiceDisposal(sim, false, "Not Pooled");
                            }
                        }
                    }
                    catch (Exception e)
                    {
                        Common.Exception(sim, e);
                    }
                }
            }
Пример #9
0
        public static void ShowTimeAlmanacDialog()
        {
            if (!Responder.Instance.IsGameStatePending || !Responder.Instance.IsGameStateShuttingDown)
            {
                ICauseEffectUiData                causeEffectData         = null;
                List <ITimeStatueUiData>          timeStatueData          = null;
                List <IDescendantHouseholdUiData> descendantHouseholdInfo = null;
                CauseEffectService                instance = CauseEffectService.GetInstance();
                if (instance != null)
                {
                    causeEffectData = instance.GetTimeAlmanacCauseEffectData();
                    timeStatueData  = instance.GetTimeAlmanacTimeStatueData();
                }
                FutureDescendantService service2 = GetInstance();
                if (service2 != null)
                {
                    // custom
                    descendantHouseholdInfo = GetTimeAlamanacDescendantHouseholdData(service2);
                }
                Sim currentSim = PlumbBob.SelectedActor;
                TimeAlmanacDialog.TimeAlmanacResult result = TimeAlmanacDialog.Show(currentSim.ObjectId, causeEffectData, descendantHouseholdInfo, timeStatueData);
                bool flag  = currentSim.OpportunityManager.HasOpportunity(OpportunityCategory.Special);
                bool flag2 = result != TimeAlmanacDialog.TimeAlmanacResult.DoNothing;
                if (flag2 && flag)
                {
                    string promptText  = Localization.LocalizeString(currentSim.IsFemale, "Ui/Caption/TimeAlmanac:ChangeEventPrompt", new object[] { currentSim, currentSim.OpportunityManager.GetActiveOpportunity(OpportunityCategory.Special).Name });
                    string buttonTrue  = Localization.LocalizeString("Ui/Caption/Global:Yes", new object[0]);
                    string buttonFalse = Localization.LocalizeString("Ui/Caption/Global:No", new object[0]);
                    flag2 = TwoButtonDialog.Show(promptText, buttonTrue, buttonFalse);
                    if (flag2)
                    {
                        currentSim.OpportunityManager.CancelOpportunityByCategory(OpportunityCategory.Special);
                    }
                }
                if (flag2)
                {
                    switch (result)
                    {
                    case TimeAlmanacDialog.TimeAlmanacResult.DoNothing:
                        break;

                    case TimeAlmanacDialog.TimeAlmanacResult.TrashOpportunity:
                        currentSim.OpportunityManager.ClearLastOpportunity(OpportunityCategory.Special);
                        currentSim.OpportunityManager.AddOpportunityNow(OpportunityNames.EP11_Trigger_DystopiaFuture, true, false);
                        return;

                    case TimeAlmanacDialog.TimeAlmanacResult.MeteorOpportunity:
                        if (CauseEffectWorldState.kUtopiaState != instance.GetCurrentCauseEffectWorldState())
                        {
                            if (CauseEffectWorldState.kDystopiaState == instance.GetCurrentCauseEffectWorldState())
                            {
                                currentSim.OpportunityManager.ClearLastOpportunity(OpportunityCategory.Special);
                                currentSim.OpportunityManager.AddOpportunityNow(OpportunityNames.EP11_Undo_DystopiaFuture, true, false);
                                return;
                            }
                            break;
                        }
                        currentSim.OpportunityManager.ClearLastOpportunity(OpportunityCategory.Special);
                        unchecked
                        {
                            currentSim.OpportunityManager.AddOpportunityNow((OpportunityNames)(-5928144135704983787L), true, false);
                        }
                        return;

                    case TimeAlmanacDialog.TimeAlmanacResult.RainbowOpportunity:
                        currentSim.OpportunityManager.ClearLastOpportunity(OpportunityCategory.Special);
                        currentSim.OpportunityManager.AddOpportunityNow(OpportunityNames.EP11_Trigger_UtopiaFuture, true, false);
                        break;

                    default:
                        return;
                    }
                }
            }
        }