public static void OnWorldLoadFinished(object sender, EventArgs e) { if (alreadyParsed) { Ferry <PersistedData> .UnloadCargo(); } alreadyParsed = false; ObjectLoader.FindAndSortAllExistingSewables(); for (int i = 0; i < Sims3.Gameplay.Queries.GetObjects <PhoneSmart>().Length; i++) { if (Sims3.Gameplay.Queries.GetObjects <PhoneSmart>()[i] != null) { AddInteractionsPhone(Sims3.Gameplay.Queries.GetObjects <PhoneSmart>()[i]); } } foreach (Computer computer in Sims3.Gameplay.Queries.GetObjects <Computer>()) { if (computer != null) { AddInteractionsComputer(computer); } } // Save/cache our loaded key to make discovery quicker. Rather than always looping through it. for (int i = 0; i < ObjectLoader.sewableSettings.Count; i++) { Pattern.mStoredPatternsKeySettingsList.Add(ObjectLoader.sewableSettings[i].key); } foreach (KeyValuePair <ulong, bool> keyvalues in GlobalOptionsSewingTable.retrieveData.whoIsInPatternClub) { print("Re-assigned the mailbox alarm!"); SimDescription description = SimDescription.Find(keyvalues.Key); Mailbox mailbox = Mailbox.GetMailboxOnLot(description.LotHome); mailbox.AddAlarmDay(1f, DaysOfTheWeek.Thursday, GlobalOptionsSewingTable.SendPatterns, "Mailbox: Pattern club " + description.mSimDescriptionId.ToString(), AlarmType.AlwaysPersisted); } //mPatternClubAlarm = AlarmManager.Global.AddAlarmDay(1f, DaysOfTheWeek.Thursday, GlobalOptionsSewingTable.SendPatterns, "Mailbox: Pattern club", AlarmType.NeverPersisted, null); //mWearClothing = AlarmManager.Global.AddAlarmRepeating(24f, TimeUnit.Hours, WearGiftedClothing, 1f, TimeUnit.Days, "Wear gifted clothing", AlarmType.AlwaysPersisted, null); EventTracker.AddListener(EventTypeId.kBoughtObject, new ProcessEventDelegate(OnObjectChanged)); EventTracker.AddListener(EventTypeId.kInventoryObjectAdded, new ProcessEventDelegate(OnObjectChanged)); EventTracker.AddListener(EventTypeId.kObjectStateChanged, new ProcessEventDelegate(OnObjectChanged)); }