private void GameLoop_GameLaunched(object sender, GameLaunchedEventArgs e) { // Setup third party mod compatibility bridge TPMC.Setup(this.Helper.ModRegistry, this.Monitor); IQuestApi questApi = this.Helper.ModRegistry.GetApi <IQuestApi>("purrplingcat.questframework"); var storyHelper = new StoryHelper(this.ContentLoader, questApi.GetManagedApi(this.ModManifest)); questApi.Events.GettingReady += (_, args) => storyHelper.LoadQuests(this.GameMaster); questApi.Events.Ready += (_, args) => storyHelper.SanitizeOldAdventureQuestsInLog(); // Mod's services and drivers this.QuestApi = questApi; this.SpecialEvents = new SpecialModEvents(); this.DialogueDriver = new DialogueDriver(this.Helper.Events); this.HintDriver = new HintDriver(this.Helper.Events); this.StuffDriver = new StuffDriver(this.Helper.Data, this.Monitor); this.MailDriver = new MailDriver(this.ContentLoader, this.Monitor); this.GameMaster = new GameMaster(this.Helper, storyHelper, this.Monitor); this.CompanionHud = new CompanionDisplay(this.Config, this.ContentLoader); this.CompanionManager = new CompanionManager(this.GameMaster, this.DialogueDriver, this.HintDriver, this.CompanionHud, this.Config, this.Monitor); this.StuffDriver.RegisterEvents(this.Helper.Events); this.MailDriver.RegisterEvents(this.SpecialEvents); this.ApplyPatches(); // Apply harmony patches this.InitializeScenarios(); }
private void GameLoop_GameLaunched(object sender, GameLaunchedEventArgs e) { // Setup third party mod compatibility bridge TPMC.Setup(this.Helper.ModRegistry, this.Monitor); // Mod's services and drivers this.SpecialEvents = new SpecialModEvents(); this.DialogueDriver = new DialogueDriver(this.Helper.Events); this.HintDriver = new HintDriver(this.Helper.Events); this.StuffDriver = new StuffDriver(this.Helper.Data, this.Monitor); this.MailDriver = new MailDriver(this.ContentLoader, this.Monitor); this.GameMaster = new GameMaster(this.Helper, new StoryHelper(this.ContentLoader), this.Monitor); this.CompanionHud = new CompanionDisplay(this.Config, this.ContentLoader); this.CompanionManager = new CompanionManager(this.GameMaster, this.DialogueDriver, this.HintDriver, this.CompanionHud, this.Config, this.Monitor); this.StuffDriver.RegisterEvents(this.Helper.Events); this.MailDriver.RegisterEvents(this.SpecialEvents); this.ApplyPatches(); // Apply harmony patches this.InitializeScenarios(); }
private void GameLoop_GameLaunched(object sender, GameLaunchedEventArgs e) { // Setup third party mod compatibility bridge TPMC.Setup(this.Helper.ModRegistry); // Mod's services and drivers this.SpecialEvents = new SpecialModEvents(); this.DialogueDriver = new DialogueDriver(this.Helper.Events); this.HintDriver = new HintDriver(this.Helper.Events); this.StuffDriver = new StuffDriver(this.Helper.Data, this.Monitor); this.contentLoader = new ContentLoader(this.Helper.Content, this.Helper.ContentPacks, this.ModManifest.UniqueID, "assets", this.Helper.DirectoryPath, this.Monitor); this.companionHud = new CompanionDisplay(this.config, this.contentLoader); this.companionManager = new CompanionManager(this.DialogueDriver, this.HintDriver, this.companionHud, this.config, this.Monitor); this.StuffDriver.RegisterEvents(this.Helper.Events); // Harmony HarmonyInstance harmony = HarmonyInstance.Create("Purrplingcat.NpcAdventure"); Patches.SpouseReturnHomePatch.Setup(harmony); Patches.CompanionSayHiPatch.Setup(harmony, this.companionManager); Patches.GameLocationDrawPatch.Setup(harmony, this.SpecialEvents); }