/// <summary> /// Re-initialize reacts, lotions, sunscreen and burn data. Refresh TV channel data. Raised when a save is loaded. /// </summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> private void onSaveLoaded(object sender, SaveLoadedEventArgs e) { //initialize new instances of Burn and Sunscreen Reacts = new Reactions(); Lotion = new Lotions(); Sunscreen = new SunscreenProtection(); Burn = new Sunburn(); Helper.Content.InvalidateCache("Strings\\StringsFromCSFiles"); //Refresh TV weather info IsSaveReady = true; }
/********* ** Private methods *********/ /**** ** GameLoop Event handlers ****/ /// <summary> /// Set up API integrations and instatiate Lotions (to handle JA items). Raised after the game is launched. /// </summary> /// <param name="sender">The event sender.</param> /// <param name="e">The event arguments.</param> private void onGameLaunched(object sender, GameLaunchedEventArgs e) { ModConfig.SetUpMenu(); JA = Helper.ModRegistry.GetApi <JsonAssets.IApi>("spacechase0.JsonAssets"); if (JA != null) { JA.LoadAssets(Path.Combine(Helper.DirectoryPath, "assets", "JA")); } else { Monitor.LogOnce("Could not connect to Json Assets. It may not be installed or working properly.", LogLevel.Error); } Lotion = new Lotions(); }