public override void Unload() { instance = null; random = null; titles = null; ShowTextKey = null; IMPCNExtension.Unload(); }
public override void Load() { instance = this; IMPCNExtension.Load(); Main.versionNumber = "v1.3.5.2\nIMPCN v" + instance.Version.ToString(); Main.versionNumber2 = "v1.3.5.2\nIMPCN v" + instance.Version.ToString(); ShowTextKey = RegisterHotKey("查询物品名称(鼠标悬停)", "Z"); // The new version of tModLoader has been updated C#. if (ModLoader.version < new Version(0, 11)) { throw new Exception("\nThis mod uses functionality only present in the latest tModLoader. Please update tModLoader to use this mod\n\n"); } if (random == null) { random = new Random(); } //LoadAlternateChinese(LanguageManager.Instance); if (LanguageManager.Instance.ActiveCulture == GameCulture.Chinese) { Mod thoriumMod = ModLoader.GetMod("ThoriumMod"); Version fixed_vers = new Version(1, 5, 1, 2); // ThoriumMod fixed the bug in version 1.5.1.2. // If exists ThoriumMod, and its version lower than 1.5.1.2. if (thoriumMod != null && thoriumMod.Version < fixed_vers) { LoadAlternateChinese(LanguageManager.Instance, "Terraria.Localization.ContentForThoriumMod."); // see RemarkOfThoriumMod.txt for details. } else { LoadAlternateChinese(LanguageManager.Instance, "Terraria.Localization.Content."); } } }