Пример #1
0
        protected override DereferenceResult Perform(BurglarSituation reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult result = DereferenceResult.Failure;

            if (Matches(reference, "IgnoreObjects", field, objects))
            {
                Remove(reference.IgnoreObjects, objects);
                result = DereferenceResult.Continue;
            }

            if (Matches(reference, "StolenObjects", field, objects))
            {
                Remove(reference.StolenObjects, objects);
                result = DereferenceResult.Continue;
            }

            if (Matches(reference, "mReactingSims", field, objects))
            {
                Remove(reference.mReactingSims, objects);
                result = DereferenceResult.Continue;
            }

            if (result != DereferenceResult.Failure)
            {
                try
                {
                    reference.Exit();
                }
                catch
                { }
            }

            return(result);
        }
Пример #2
0
        protected override DereferenceResult Perform(OccultFairy reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            ReferenceWrapper result;

            if (Matches(reference, "mOwningSim", field, objects, out result) != MatchResult.Failure)
            {
                if (result.Valid)
                {
                    Remove(ref reference.mOwningSim);
                }
                return(DereferenceResult.End);
            }

            if (Matches(reference, "mTrueFairyForm", field, objects, out result) != MatchResult.Failure)
            {
                if (result.Valid)
                {
                    Remove(ref reference.mTrueFairyForm);
                }
                return(DereferenceResult.End);
            }

            DereferenceResult reason = MatchAndRemove(reference, "mEventLunarCycleEvent", field, ref reference.mEventLunarCycleEvent, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #3
0
        protected override DereferenceResult Perform(Medical reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            if (Matches(reference, "mHouseCallSim", field, objects))
            {
                Remove(ref reference.mHouseCallSim);
                return(DereferenceResult.End);
            }

            if (Matches(reference, "mBeeper", field, objects))
            {
                Remove(ref reference.mBeeper);
                return(DereferenceResult.End);
            }

            ReferenceWrapper result;

            if (Matches(reference, "mJournal", field, objects, out result) != MatchResult.Failure)
            {
                if (result.Valid)
                {
                    Remove(ref reference.mJournal);
                }

                return(DereferenceResult.End);
            }

            DereferenceResult reason = MatchAndRemove(reference, "mNewLotListener", field, ref reference.mNewLotListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #4
0
        protected override DereferenceResult Perform(GameObject reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mDoneEatingEventListener", field, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            FieldInfo        actualField;
            ReferenceWrapper result;

            if (Matches(reference, "mCookedFood", field, objects, out result, out actualField) != MatchResult.Failure)
            {
                if (result.Valid)
                {
                    Remove(actualField, ref reference);
                }
                return(DereferenceResult.End);
            }

            if (Matches(reference, "mFoodContainer", field, objects, out result, out actualField) != MatchResult.Failure)
            {
                if (result.Valid)
                {
                    Remove(actualField, ref reference);
                }
                return(DereferenceResult.End);
            }

            return(DereferenceResult.Failure);
        }
Пример #5
0
        protected override DereferenceResult Perform(Punishment reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            ReferenceWrapper result;

            if (Matches(reference, "mOwner", field, objects, out result) != MatchResult.Failure)
            {
                if (result.Valid)
                {
                    Remove(ref reference.mOwner);
                }
                return(DereferenceResult.End);
            }

            DereferenceResult reason = MatchAndRemove(reference, "mSimsChangedLotsListener", field, ref reference.mSimsChangedLotsListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mSneakingOnHomeLotListener", field, ref reference.mSneakingOnHomeLotListener, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mSneakingFromHomeLotListener", field, ref reference.mSneakingFromHomeLotListener, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #6
0
        protected override DereferenceResult Perform(Daycare reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mEventListenerPregnancy", field, ref reference.mEventListenerPregnancy, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mEventListenerUnpaidTimeOff", field, ref reference.mEventListenerUnpaidTimeOff, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mEventListenerPaidTimeOff", field, ref reference.mEventListenerPaidTimeOff, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mEventListenerMoving", field, ref reference.mEventListenerMoving, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mEventListenerEditGameMoving", field, ref reference.mEventListenerEditGameMoving, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #7
0
        protected override DereferenceResult Perform(VaccinationSessionSituation reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mLeaveConversationListener", field, ref reference.mLeaveConversationListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            if (Matches(reference, "Vaccinator", field, objects))
            {
                if (Performing)
                {
                    try
                    {
                        reference.Dispose();
                    }
                    catch
                    { }

                    Remove(ref reference.Vaccinator);
                }
                return(DereferenceResult.End);
            }

            if (Matches(reference, "mIgnoreList", field, objects))
            {
                if (Performing)
                {
                    try
                    {
                        reference.Dispose();
                    }
                    catch
                    { }

                    Remove(reference.mIgnoreList, objects);
                }
                return(DereferenceResult.End);
            }

            if (Matches(reference, "mInterruptedVaccinationSeekers", field, objects))
            {
                if (Performing)
                {
                    try
                    {
                        reference.Dispose();
                    }
                    catch
                    { }

                    RemoveKeys(reference.mInterruptedVaccinationSeekers, objects);
                }
                return(DereferenceResult.End);
            }

            return(DereferenceResult.Failure);
        }
Пример #8
0
        protected override DereferenceResult Perform(GlassFloor reference, FieldInfo field, List<ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mSnowLevelChangedListener", field, ref reference.mSnowLevelChangedListener, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return reason;
            }

            return DereferenceResult.Failure;
        }
Пример #9
0
        protected override DereferenceResult Perform(PoolParty reference, FieldInfo field, List<ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mOnHostDiedListener", field, ref reference.mOnHostDiedListener, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return reason;
            }

            return DereferenceResult.Failure;
        }
        protected override DereferenceResult Perform(BuffImminentRomance.BuffInstanceImminentRomance reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mListener", field, ref reference.mListener, objects, DereferenceResult.ContinueIfReferenced);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #11
0
        protected override DereferenceResult Perform(UniversityMascot reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mMascotDestroyedListener", field, ref reference.mMascotDestroyedListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(DereferenceResult.End);
            }

            return(DereferenceResult.Failure);
        }
        protected override DereferenceResult Perform(ParentOfRoboticsRecordData reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mTraitChipsInstalledListener", field, ref reference.mTraitChipsInstalledListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #13
0
        protected override DereferenceResult Perform(WashDishesOpportunity reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mDishDeletedListener", field, ref reference.mDishDeletedListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #14
0
        protected override DereferenceResult Perform(TimeKeeperRecordData reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mFutureChangeListener", field, ref reference.mFutureChangeListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #15
0
        protected override DereferenceResult Perform(MoonDial reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mEventLunarCycleEvent", field, ref reference.mEventLunarCycleEvent, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
        protected override DereferenceResult Perform(ParentsLeavingTownSituation.ParentsAreAway reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mOnOwnerDyingButStillSelectableListener", field, ref reference.mOnOwnerDyingButStillSelectableListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #17
0
        protected override DereferenceResult Perform(TrendsetterRecordData reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mBoughtOutfitListener", field, ref reference.mBoughtOutfitListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #18
0
        protected override DereferenceResult Perform(Grocery reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mOnSeasonTransitionEvent", field, ref reference.mOnSeasonTransitionEvent, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #19
0
        protected override DereferenceResult Perform(UniqueObject reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mEventListener", field, ref reference.mEventListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #20
0
        protected override DereferenceResult Perform(EntertainerRecordData reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mSimWatchingListener", field, ref reference.mSimWatchingListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #21
0
        protected override DereferenceResult Perform(Phone.CallChat reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult result = DereferenceResult.Failure;

            if (Matches(reference, "mHandset", field, objects))
            {
                Remove(ref reference.mHandset);
                result = DereferenceResult.Continue;
            }

            return(result);
        }
Пример #22
0
        protected override DereferenceResult Perform(U reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            if (Matches(reference, "mSpawnedObject", field, objects))
            {
                Remove(ref reference.mSpawnedObject);
                return(DereferenceResult.End);
            }

            DereferenceResult reason = MatchAndRemove(reference, "mOnSimSelectedEventListener", field, ref reference.mOnSimSelectedEventListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #23
0
        protected override DereferenceResult Perform(HolidayManager reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mSeasonStartedListener", field, ref reference.mSeasonStartedListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mCurrentSeasonLengthChanged", field, ref reference.mSeasonStartedListener, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #24
0
        protected override DereferenceResult Perform(Job reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mSimEnteredSpecificLotListener", field, ref reference.mSimEnteredSpecificLotListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mRabbitHoleDisposed", field, ref reference.mRabbitHoleDisposed, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #25
0
        protected override DereferenceResult Perform(PhilanthropistRecordData reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mWonLottoListener", field, ref reference.mWonLottoListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mDonatedMoneyListener", field, ref reference.mDonatedMoneyListener, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #26
0
        protected override DereferenceResult Perform(Motives reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            if (Matches(reference, "mSim", field, objects))
            {
                Remove(ref reference.mSim);
                return(DereferenceResult.End);
            }

            DereferenceResult reason = MatchAndRemove(reference, "mSeasonsChangedEventListener", field, ref reference.mSeasonsChangedEventListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #27
0
        protected override DereferenceResult Perform(SeedSpawnerRarity reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mObjectPlantedListener", field, ref reference.mObjectPlantedListener, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mSeedTakenListener", field, ref reference.mSeedTakenListener, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #28
0
        protected override DereferenceResult Perform(DaycareChildManager reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult reason = MatchAndRemove(reference, "mEventListenerAgeUp", field, ref reference.mEventListenerAgeUp, objects, DereferenceResult.End);

            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            reason = MatchAndRemove(reference, "mEventListenerDied", field, ref reference.mEventListenerDied, objects, DereferenceResult.End);
            if (reason != DereferenceResult.Failure)
            {
                return(reason);
            }

            return(DereferenceResult.Failure);
        }
Пример #29
0
        protected override DereferenceResult Perform(OverlayInstance reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult result = DereferenceResult.Failure;

            if (Matches(reference, "mOverlay", field, objects))
            {
                Remove(ref reference.mOverlay);
                result = DereferenceResult.Continue;
            }

            if (Matches(reference, "Actor", field, objects))
            {
                Remove(ref reference.Actor);
                result = DereferenceResult.Continue;
            }

            return(result);
        }
Пример #30
0
        protected override DereferenceResult Perform(Event reference, FieldInfo field, List <ReferenceWrapper> objects)
        {
            DereferenceResult result = DereferenceResult.Failure;

            if (Matches(reference, "mActor", field, objects))
            {
                Remove(ref reference.mActor);
                result = DereferenceResult.Continue;
            }

            if (Matches(reference, "mTargetObject", field, objects))
            {
                Remove(ref reference.mTargetObject);
                result = DereferenceResult.Continue;
            }

            return(result);
        }