public override void Load() { //if (ModLoader.version < new Version(0, 9, 1)) //{ // throw new Exception("\nThis mod uses functionality only present in the latest tModLoader. Please update tModLoader to use this mod\n\n"); //} herosmod = ModLoader.GetMod("HEROsMod"); Mod cheatSheet = ModLoader.GetMod("CheatSheet"); if (cheatSheet != null && cheatSheet.Version <= new Version(0, 2, 5, 10)) { throw new Exception("Please update CheatSheet to the latest version to use alongside AutoTrash"); } instance = this; autoTrashGlobalItem = (AutoTrashGlobalItem)GetGlobalItem("AutoTrashGlobalItem"); if (!Main.dedServ) { autoTrashListUI = new AutoTrashListUI(); autoTrashListUI.Activate(); autoTrashUserInterface = new UserInterface(); autoTrashUserInterface.SetState(autoTrashListUI); UICheckbox.checkboxTexture = GetTexture("checkBox"); UICheckbox.checkmarkTexture = GetTexture("checkMark"); } }
public override void Unload() { instance = null; autoTrashUserInterface = null; UICheckbox.checkboxTexture = null; UICheckbox.checkmarkTexture = null; }
public override void Unload() { instance = null; autoTrashUserInterface = null; herosmod = null; hasPermission = false; UICheckbox.checkboxTexture = null; UICheckbox.checkmarkTexture = null; }
public override void Unload() { instance = null; autoTrashUserInterface = null; }