public override void ExposeData() { base.ExposeData(); Scribe_Values.LookValue <bool>(ref initialized, "initialized", false); Scribe_Values.LookValue <int>(ref numAncestorsToVisit, "numAncestorsToVisit", 3); Scribe_Deep.LookDeep <ApprovalTracker>(ref this.approval, "approval", new object[0]); Scribe_Deep.LookDeep <AncestorMemoTimer>(ref this.timer, "timer", new object[0]); Scribe_Collections.LookList <Pawn>(ref this.unspawnedAncestors, "unspawnedAncestors", LookMode.Deep, new object[0]); Scribe_Collections.LookList <Building>(ref this.spawners, "spawners", LookMode.MapReference); // Probably there's a better way to do this! if (this.visitSchedule == null) { var seasonStart = AncestorUtils.EstStartOfSeasonAt(Find.TickManager.TicksGame); this.visitSchedule = AncestorVisitScheduler.BuildSeasonSchedule(seasonStart); } Scribe_Deep.LookDeep <VisitScheduleForSeason>(ref this.visitSchedule, "visitSchedule", new object[0]); }
public static VisitScheduleForSeason BuildSeasonScheduleForCurrentSeason() { long seasonStartTicks = AncestorUtils.EstStartOfSeasonAt(Find.TickManager.TicksAbs); return(BuildSeasonSchedule(seasonStartTicks)); }