Пример #1
0
            public override bool InRabbitHole()
            {
                try
                {
                    BeginCommodityUpdates();
                    bool succeeded = DoLoop(~(ExitReason.Replan | ExitReason.MidRoutePushRequested | ExitReason.ObjectStateChanged | ExitReason.PlayIdle | ExitReason.MaxSkillPointsReached), LearnLoop, mCurrentStateMachine);
                    EndCommodityUpdates(succeeded);

                    HomeSchooling school = Actor.School as HomeSchooling;
                    if (school != null)
                    {
                        school.HandleHomework(Actor, true);
                        school.StartHomeworkAlarm();
                    }
                }
                catch (ResetException)
                {
                    throw;
                }
                catch (Exception exception)
                {
                    Common.Exception(Actor, Target, exception);
                }
                return(true);
            }
Пример #2
0
            public override bool Run()
            {
                try
                {
                    StandardEntry();
                    if (!Target.StartComputing(this, SurfaceHeight.Table, true))
                    {
                        StandardExit();
                        return(false);
                    }

                    AnimateSim("GenericTyping");

                    HomeSchooling school = Actor.School as HomeSchooling;
                    if (school != null)
                    {
                        school.HandleHomework(Actor, false);
                        school.StartHomeworkAlarm();
                    }

                    Target.StopComputing(this, Computer.StopComputingAction.TurnOff, false);
                    StandardExit();
                }
                catch (ResetException)
                {
                    throw;
                }
                catch (Exception exception)
                {
                    Common.Exception(Actor, Target, exception);
                }
                return(true);
            }