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); }
public static void OnBootHomework() { try { foreach (SimDescription sim in Household.EveryHumanSimDescription()) { if (sim.CareerManager == null) { continue; } HomeSchooling school = sim.CareerManager.School as HomeSchooling; if (school == null) { continue; } school.StartHomeworkAlarm(); } } catch (ResetException) { throw; } catch (Exception exception) { Common.Exception("OnBootHomework", exception); } }
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); }