public override void Unload() { if (!Main.dedServ) { customResources = null; customResources2 = null; customResources3 = null; customResources4 = null; customResources5 = null; customResources6 = null; stamina = null; collection = null; overlay = null; infusion = null; cooking = null; linkhp = null; VitricBackgroundDust.Clear(); VitricForegroundDust.Clear(); CursedAccessory.Bootlegdust.Clear(); BlessedAccessory.Bootlegdust.Clear(); BlessedAccessory.Bootlegdust2.Clear(); Collection.Bootlegdust.Clear(); Overlay.Bootlegdust.Clear(); Instance = null; Dash = null; Superdash = null; Float = null; Smash = null; Purify = null; } }
public override void Load() { Dash = RegisterHotKey("Dash", "LeftShift"); Superdash = RegisterHotKey("Void Dash", "Q"); Smash = RegisterHotKey("Smash", "Z"); Float = RegisterHotKey("Float", "F"); Purify = RegisterHotKey("Purify", "N"); if (!Main.dedServ) { customResources = new UserInterface(); customResources2 = new UserInterface(); customResources3 = new UserInterface(); customResources4 = new UserInterface(); customResources5 = new UserInterface(); customResources6 = new UserInterface(); stamina = new Stamina(); collection = new Collection(); overlay = new Overlay(); infusion = new Infusion(); cooking = new Cooking(); linkhp = new LinkHP(); customResources.SetState(stamina); customResources2.SetState(collection); customResources3.SetState(overlay); customResources4.SetState(infusion); customResources5.SetState(cooking); customResources6.SetState(linkhp); } // Cursed Accessory Control Override On.Terraria.UI.ItemSlot.LeftClick_ItemArray_int_int += NoClickCurse; On.Terraria.UI.ItemSlot.Draw_SpriteBatch_ItemArray_int_int_Vector2_Color += DrawSpecial; On.Terraria.UI.ItemSlot.RightClick_ItemArray_int_int += NoSwapCurse; //Character Slot Addons On.Terraria.GameContent.UI.Elements.UICharacterListItem.DrawSelf += DrawSpecialCharacter; //Link mode healthbar On.Terraria.Main.DrawInterface_Resources_Life += LinkModeHealth; //Vitrick background On.Terraria.Main.DrawBackgroundBlackFill += drawVitricBackground; }