public override void ConfigureInteraction() { try { mCareer = Actor.OccupationAsCareer; mFinishTime = (SimClock.Hours24 + mCareer.CurLevel.DayLength) % 24; InteractionIconKey = new ThumbnailKey(ResourceKey.CreatePNGKey(mCareer.DreamsAndPromisesIcon, 0x0), ThumbnailSize.Medium); mCareer.SetTones(this); StringDelegate delegate2; if (((mCareer.LastTone != null) && mCareer.LastTone.ShouldAddTone(mCareer)) && mCareer.LastTone.Test(this, out delegate2)) { CurrentTone = mCareer.LastTone; } if (mCareer.IsSpecialWorkTime) { TimeOfDayStage stage = new TimeOfDayStage(LocalizeString("WorkStage", new object[0x0]), mCareer.HourSpecialWorkTimeEnds, 24f); Stages = new List <Stage>(new Stage[] { stage }); } else { float maxDurationInHours = (mCareer.CurLevel.DayLength + Career.kNumHoursEarlyCanShowUpForWork) + mCareer.OvertimeHours; WorkInRabbitHoleStage stage2 = new WorkInRabbitHoleStage(LocalizeString("WorkEndShiftStage", new object[0x0]), mFinishTime, maxDurationInHours, mCareer); Stages = new List <Stage>(new Stage[] { stage2 }); ActiveStage = stage2; if (Actor.TraitManager.HasElement(TraitNames.Workaholic)) { foreach (CareerTone tone in mCareer.Tones) { if (tone is WorkHardTone) { CurrentTone = tone; break; } } } else if (Actor.TraitManager.HasElement(TraitNames.Schmoozer)) { foreach (CareerTone tone2 in mCareer.Tones) { if (tone2 is SuckUpToBossTone) { CurrentTone = tone2; break; } } } } } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); } }
public override void ConfigureInteraction() { try { Career school = Actor.School; school.SetTones(this); StringDelegate delegate2; if (((school.LastTone != null) && school.LastTone.ShouldAddTone(school)) && school.LastTone.Test(this, out delegate2)) { CurrentTone = school.LastTone; } if (Actor.TraitManager.HasElement(TraitNames.Schmoozer)) { foreach (CareerTone tone in school.Tones) { if (tone is SuckUpToBossTone) { CurrentTone = tone; break; } } } float maxDurationInHours = (school.DayLength + Career.kNumHoursEarlyCanShowUpForWork) + Actor.School.SchoolTuning.DetentionLengthInHours; float finishTime = (SimClock.Hours24 + school.DayLength) % 24; WorkInRabbitHoleStage stage = new WorkInRabbitHoleStage(Common.LocalizeEAString(Actor.IsFemale, "Gameplay/Careers/WorkInRabbitHole:SchoolAttend"), finishTime, maxDurationInHours, school); Stages = new List <Stage>(new Stage[] { stage }); ActiveStage = stage; } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); } }
public override void ConfigureInteraction() { try { mCareer = Actor.OccupationAsCareer; mFinishTime = (SimClock.Hours24 + mCareer.CurLevel.DayLength) % 24; InteractionIconKey = new ThumbnailKey(ResourceKey.CreatePNGKey(mCareer.DreamsAndPromisesIcon, 0x0), ThumbnailSize.Medium); mCareer.SetTones(this); StringDelegate delegate2; if (((mCareer.LastTone != null) && mCareer.LastTone.ShouldAddTone(mCareer)) && mCareer.LastTone.Test(this, out delegate2)) { CurrentTone = mCareer.LastTone; } if (mCareer.IsSpecialWorkTime) { TimeOfDayStage stage = new TimeOfDayStage(LocalizeString("WorkStage", new object[0x0]), mCareer.HourSpecialWorkTimeEnds, 24f); Stages = new List<Stage>(new Stage[] { stage }); } else { float maxDurationInHours = (mCareer.CurLevel.DayLength + Career.kNumHoursEarlyCanShowUpForWork) + mCareer.OvertimeHours; WorkInRabbitHoleStage stage2 = new WorkInRabbitHoleStage(LocalizeString("WorkEndShiftStage", new object[0x0]), mFinishTime, maxDurationInHours, mCareer); Stages = new List<Stage>(new Stage[] { stage2 }); ActiveStage = stage2; if (Actor.TraitManager.HasElement(TraitNames.Workaholic)) { foreach (CareerTone tone in mCareer.Tones) { if (tone is WorkHardTone) { CurrentTone = tone; break; } } } else if (Actor.TraitManager.HasElement(TraitNames.Schmoozer)) { foreach (CareerTone tone2 in mCareer.Tones) { if (tone2 is SuckUpToBossTone) { CurrentTone = tone2; break; } } } } } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); } }
public override void ConfigureInteraction() { try { Career school = Actor.School; school.SetTones(this); StringDelegate delegate2; if (((school.LastTone != null) && school.LastTone.ShouldAddTone(school)) && school.LastTone.Test(this, out delegate2)) { CurrentTone = school.LastTone; } if (Actor.TraitManager.HasElement(TraitNames.Schmoozer)) { foreach (CareerTone tone in school.Tones) { if (tone is SuckUpToBossTone) { CurrentTone = tone; break; } } } float maxDurationInHours = (school.DayLength + Career.kNumHoursEarlyCanShowUpForWork) + Actor.School.SchoolTuning.DetentionLengthInHours; float finishTime = (SimClock.Hours24 + school.DayLength) % 24; WorkInRabbitHoleStage stage = new WorkInRabbitHoleStage(Common.LocalizeEAString(Actor.IsFemale, "Gameplay/Careers/WorkInRabbitHole:SchoolAttend"), finishTime, maxDurationInHours, school); Stages = new List<Stage>(new Stage[] { stage }); ActiveStage = stage; } catch (ResetException) { throw; } catch (Exception e) { Common.Exception(Actor, Target, e); } }