public static void Add(SimDescription sim, MiniSimDescription miniSim) { sChecks.Add(new Check(sim, miniSim)); if (sTask == null) { sTask = new AgingCheckTask(); sTask.AddToSimulator(); } }
public static void MergeTravelInformation(SimDescription ths, MiniSimDescription msd, Dictionary <ulong, SimDescription> allSims) { Common.StringBuilder msg = new Common.StringBuilder("MergeTravelInformation " + ths.FullName + Common.NewLine); msg += "A"; Traveler.InsanityWriteLog(msg); foreach (MiniRelationship relationship in msd.MiniRelationships) { SimDescription y = null; if (!allSims.TryGetValue(relationship.SimDescriptionId, out y)) { y = SimDescription.Find(relationship.SimDescriptionId); } if (y != null) { Relationship unsafely = null; try { unsafely = Relationship.GetUnsafely(ths, y); } catch (Exception e) { Common.Exception(ths, e); } if (unsafely != null) { float change = relationship.Value - unsafely.LTR.Liking; if (change != 0f) { unsafely.LTR.UpdateLiking(change); } RomanceVisibilityState.MergeTravelInformationOnTravelBackHome(relationship, unsafely); } } } msg += "B"; Traveler.InsanityWriteLog(msg); ths.CASGenealogy = msd.CASGenealogy; AgingCheckTask.Add(ths, msd); msg += "C"; Traveler.InsanityWriteLog(msg); }
public void OnWorldQuit() { sTask = null; sChecks.Clear(); }