public static void AddAllInteractionsForHospitals() { try { List <Hospital> list = new List <Hospital>(Sims3.Gameplay.Queries.GetObjects <Hospital>()); foreach (Hospital hospital in list) { if (hospital != null) { Instantiator.AddInteractionsToHospitals(hospital); } } List <ComboHospitalScienceLab> list2 = new List <ComboHospitalScienceLab>(Sims3.Gameplay.Queries.GetObjects <ComboHospitalScienceLab>()); foreach (ComboHospitalScienceLab hospital in list2) { if (hospital != null) { Instantiator.AddInteractionsToHospitals(hospital); } } } catch (Exception exception) { Instantiator.Exception(exception); StyledNotification.Show(new StyledNotification.Format("Failed to load Vampire Tweaker Interactions. Error generated by fer456.VampireTweaker.Interactions.dll. See info below and in Documents_Electronic Arts_The Sims 3" + exception, StyledNotification.NotificationStyle.kDebugAlert)); } }
public static void OnWorldLoadFinishedHandler(object sender, EventArgs e) { try { if (GameUtils.IsInstalled(ProductVersion.EP7) || GameUtils.IsInstalled(ProductVersion.EP3)) { Instantiator.AddInteractionsToCityHall(); if (Instantiator.pInteractionsActive) { Instantiator.AddAllInteractionsForSims(); Instantiator.AddAllInteractionsForUrnstones(); Instantiator.AddAllInteractionsForHospitals(); } if (Instantiator.pBloodActive) { VTBlood.OnWorldLoadFinishedHandler(); } if (Instantiator.pBiteMarkActive) { VTBiteMark.OnWorldLoadFinishedHandler(); } if (Instantiator.pThirstActive) { VTThirst.OnWorldLoadFinishedHandler(); } if (Instantiator.pConversionActive) { VTConversion.OnWorldLoadFinishedHandler(); } if (!Instantiator.pLoadNotificationDeActived) { StyledNotification.Show(new StyledNotification.Format("Loaded Vampire Tweaker correctly without any errors", StyledNotification.NotificationStyle.kSystemMessage)); SimpleMessageDialog.Show("Vampire Tweaker", "Every functionality of the mod is deactivated, please, consider to go to City Hall>Vampire Tweaker... to customize the mod with a easy method and disable this message and the notification to load on start. Anything won´t work if you don´t active in the City Hall the function."); if (!GameUtils.IsInstalled(ProductVersion.EP7)) { StyledNotification.Show(new StyledNotification.Format("We have detected you haven´t installed Supernatural EP. Some functionalities of the mod requires this expansion, but it won´t generate any conflicts. The functionalities will be activated the first time you install Supernatural EP", StyledNotification.NotificationStyle.kSystemMessage)); } } if (!Instantiator.pBuffActive) { sBuffSparkleDisable = EventTracker.AddListener(EventTypeId.kGotBuff, new ProcessEventDelegate(EnableSparkle.OnGotBuff)); } } if (!GameUtils.IsInstalled(ProductVersion.EP7) || !GameUtils.IsInstalled(ProductVersion.EP3)) { SimpleMessageDialog.Show("Vampire Tweaker", "It seems you haven´t installed any expansion of Vampires (Late Night or Supernatural). The mod is deactivated and any function won´t work. Upgrade the Expansion Pack or install it. If you won´t install any expansion, you should remove this mod, it isn´t useful for you without the EPs."); } } catch (Exception exception) { Instantiator.Exception(exception); StyledNotification.Show(new StyledNotification.Format("Failed to load Vampire Tweaker things. Error generated by fer456.VampireTweaker.Interactions.dll into VampireTweaker.ModInitiatorAndHandler.Instantiator || See info below and in Documents_Electronic Arts_The Sims 3" + exception, StyledNotification.NotificationStyle.kDebugAlert)); } }
public static void RemoveAllInteractionsForUrnstones() { List <Urnstone> list = new List <Urnstone>(Sims3.Gameplay.Queries.GetObjects <Urnstone>()); foreach (Urnstone urnstone in list) { if (urnstone != null) { Instantiator.RemoveUrnstoneInteractions(urnstone); } } }
public static void RemoveAllInteractionsForSims() { List <Sim> list = new List <Sim>(Sims3.Gameplay.Queries.GetObjects <Sim>()); foreach (Sim sim in list) { if (sim != null) { Instantiator.RemoveSimInteractions(sim); } } }
public static void AddInteractions(Sim obj) { try { obj.AddInteraction(ForceConversion.Singleton, true); obj.AddInteraction(VampireTweaker.Interactions.Resurrect.Singleton, true); obj.AddInteraction(Kill.Singleton, true); } catch (Exception exception) { Instantiator.Exception(exception); StyledNotification.Show(new StyledNotification.Format("Failed to load Vampire Tweaker Interactions. Error generated by fer456.VampireTweaker.Interactions.dll. See info below and in Documents_Electronic Arts_The Sims 3" + exception, StyledNotification.NotificationStyle.kDebugAlert)); } }
protected static ListenerAction HandleNewSim(Event e) { try { Sim sim = e.TargetObject as Sim; if (sim != null) { Instantiator.AddInteractions(sim); } } catch (Exception exception) { Instantiator.Exception(exception); StyledNotification.Show(new StyledNotification.Format("Failed to load Vampire Tweaker Interactions. Error generated by fer456.VampireTweaker.Interactions.dll. See info below and in Documents_Electronic Arts_The Sims 3" + exception, StyledNotification.NotificationStyle.kDebugAlert)); } return(ListenerAction.Keep); }
private static ListenerAction OnObjectChanged(Event e) { try { Urnstone urnstone = e.TargetObject as Urnstone; if (urnstone != null) { Instantiator.AddInteractionsForUrnstones(urnstone); } } catch (Exception exception) { Instantiator.Exception(exception); StyledNotification.Show(new StyledNotification.Format("Failed to load Vampire Tweaker Interactions. Error generated by fer456.VampireTweaker.Interactions.dll. See info below and in Documents_Electronic Arts_The Sims 3" + exception, StyledNotification.NotificationStyle.kDebugAlert)); } return(ListenerAction.Keep); }
public static void RemoveAllInteractionsForHospitals() { List <Hospital> list = new List <Hospital>(Sims3.Gameplay.Queries.GetObjects <Hospital>()); foreach (Hospital rabbithole in list) { if (rabbithole != null) { Instantiator.RemoveHospitalInteractions(rabbithole); } } List <ComboHospitalScienceLab> list2 = new List <ComboHospitalScienceLab>(Sims3.Gameplay.Queries.GetObjects <ComboHospitalScienceLab>()); foreach (ComboHospitalScienceLab hospital in list2) { if (hospital != null) { Instantiator.RemoveHospitalInteractions(hospital); } } }
private static void AddInteractionsToCityHall() { List <CityHall> list = new List <CityHall>(Sims3.Gameplay.Queries.GetObjects <CityHall>()); foreach (CityHall obj in list) { if (obj != null) { Instantiator.AddGameObjInteractions(obj); } } List <CityHallEP11> list2 = new List <CityHallEP11>(Sims3.Gameplay.Queries.GetObjects <CityHallEP11>()); foreach (CityHallEP11 obj in list2) { if (obj != null) { Instantiator.AddGameObjInteractions(obj); } } List <CityHallNoClock> list3 = new List <CityHallNoClock>(Sims3.Gameplay.Queries.GetObjects <CityHallNoClock>()); foreach (CityHallNoClock obj in list3) { if (obj != null) { Instantiator.AddGameObjInteractions(obj); } } List <ComboCityhallPoliceMilitary> list4 = new List <ComboCityhallPoliceMilitary>(Sims3.Gameplay.Queries.GetObjects <ComboCityhallPoliceMilitary>()); foreach (ComboCityhallPoliceMilitary obj in list4) { if (obj != null) { Instantiator.AddGameObjInteractions(obj); } } }
public static void AddAllInteractionsForUrnstones() { try { List <Urnstone> list = new List <Urnstone>(Sims3.Gameplay.Queries.GetObjects <Urnstone>()); foreach (Urnstone urnstone in list) { if (urnstone != null) { Instantiator.AddInteractionsForUrnstones(urnstone); } } sBoughtObject = EventTracker.AddListener(EventTypeId.kBoughtObject, new ProcessEventDelegate(Instantiator.OnObjectChanged)); sOnObjectAddedToInventory = EventTracker.AddListener(EventTypeId.kInventoryObjectAdded, new ProcessEventDelegate(Instantiator.OnObjectChanged)); sOnObjectChanged = EventTracker.AddListener(EventTypeId.kObjectStateChanged, new ProcessEventDelegate(Instantiator.OnObjectChanged)); } catch (Exception exception) { Instantiator.Exception(exception); StyledNotification.Show(new StyledNotification.Format("Failed to load Vampire Tweaker Interactions. Error generated by fer456.VampireTweaker.Interactions.dll. See info below and in Documents_Electronic Arts_The Sims 3" + exception, StyledNotification.NotificationStyle.kDebugAlert)); } }