Esempio n. 1
0
            public override bool InRabbitHole()
            {
                try
                {
                    if (!GoToSchoolInRabbitHoleHelper.PreInRabbitholeLoop(this, true))
                    {
                        return(false);
                    }

                    bool succeeded = DoLoop(ExitReason.StageComplete, LoopDelegate, null);

                    AfterschoolActivity activity = null;
                    bool hasAfterschoolActivity  = false;

                    bool detention = false;
                    bool fieldTrip = false;

                    GoToSchoolInRabbitHoleHelper.PostInRabbitHoleLoop(this, ref succeeded, ref detention, ref fieldTrip, ref activity, ref hasAfterschoolActivity);

                    if (detention && !fieldTrip)
                    {
                        succeeded = DoLoop(ExitReason.StageComplete, LoopDelegate, null);
                    }

                    InteractionInstance.InsideLoopFunction afterSchoolLoop = null;
                    GoToSchoolInRabbitHoleHelper.PostDetentionLoop(this, succeeded, detention, fieldTrip, activity, hasAfterschoolActivity, ref afterSchoolLoop);

                    if (afterSchoolLoop != null)
                    {
                        succeeded = DoLoop(ExitReason.StageComplete, afterSchoolLoop, mCurrentStateMachine);
                    }
                    else
                    {
                        succeeded = DoLoop(ExitReason.StageComplete);
                    }

                    GoToSchoolInRabbitHoleHelper.PostAfterSchoolLoop(this, succeeded, activity, afterSchoolLoop);

                    return(succeeded);
                }
                catch (ResetException)
                {
                    throw;
                }
                catch (Exception e)
                {
                    Common.Exception(Actor, Target, e);
                    return(false);
                }
            }
Esempio n. 2
0
            public override bool RouteNearEntranceAndIntoBuilding(bool canUseCar, Route.RouteMetaType routeMetaType)
            {
                try
                {
                    GoToSchoolInRabbitHoleHelper.PreRouteNearEntranceAndIntoBuilding(this, canUseCar, routeMetaType, OnChangeOutfit);

                    return(Target.RouteNearEntranceAndEnterRabbitHole(Actor, this, BeforeEnteringRabbitHole, canUseCar, routeMetaType, true));
                }
                catch (ResetException)
                {
                    throw;
                }
                catch (Exception e)
                {
                    Common.Exception(Actor, Target, e);
                    return(false);
                }
            }
Esempio n. 3
0
        // LoganDownUnder_Aussomedays_END

        public override bool RouteNearEntranceAndIntoBuilding(bool canUseCar, Route.RouteMetaType routeMetaType)
        {
            try
            {
                GoToSchoolInRabbitHoleHelper.PreRouteNearEntranceAndIntoBuilding(this, canUseCar, routeMetaType, OnChangeOutfit);

                //LoganDownUnder_03Mar2017 -- only branch to slot reassignment if target is actual school rabbithole
                if (Target is ISchoolRabbitHole)
                {
                    return(RouteNearEntranceAndEnterRabbitHole(Actor, this, BeforeEnteringRabbitHole, canUseCar, routeMetaType, true));
                }
                // otherwise use original method
                return(Target.RouteNearEntranceAndEnterRabbitHole(Actor, this, BeforeEnteringRabbitHole, canUseCar, routeMetaType, true));
            }
            catch (ResetException)
            {
                throw;
            }
            catch (Exception e)
            {
                Common.Exception(Actor, Target, e);
                return(false);
            }
        }