public override void OnEnterWorld(Player player) { // Reset the lists/dictionaries and bools AmmoboxPlus.resetVariables(); AmmoboxWorld.apInsertedPostMechAny = false; AmmoboxWorld.apInsertedPostMechAll = false; AmmoboxWorld.apInsertedPostPlantera = false; AmmoboxWorld.apInsertedPostGolem = false; AmmoboxWorld.apInsertedPostMoonlord = false; AmmoboxWorld.apInsertedPostHMActive = false; AmmoboxWorld.apInsertedAlwaysAvailablePHM = false; }
public override void Unload() { instance = null; AmmoboxAmmoUI = null; AmmoboxAmmoIconInterface = null; AmmoboxSwapUI = null; AmmoboxAmmoSwapInterface = null; AmmoboxBagAllowedHM = null; AmmoboxBagAllowedPHM = null; AmmoboxBagModdedHM = null; AmmoboxBagModdedPHM = null; AmmoboxOreModded = null; AmmoboxOreVanillaHM = null; AmmoboxOreVanillaPHM = null; AmmoboxModdedBlacklist = null; AmmoboxVanillaAmmo = null; AmmoboxVanillaHMAmmo = null; AmmoboxModAmmoHM = null; AmmoboxModAmmoPHM = null; RocketNameTypes = null; AmmoboxAmmoIconHotkey = null; AmmoboxAmmoSwapHotkey = null; }
public override void Load() { instance = this; // Set defaults for the Lists/Dictionaries AmmoboxModdedBlacklist = new List <int>(); AmmoboxBagModdedHM = new List <int>(); AmmoboxBagModdedPHM = new List <int>(); AmmoboxAmmoIconHotkey = RegisterHotKey("Display used ammo", "P"); AmmoboxAmmoSwapHotkey = RegisterHotKey("Switch between ammo", "C"); AmmoboxAmmoUI = new AmmoIconUI(); AmmoboxAmmoUI.Activate(); AmmoboxAmmoIconInterface = new UserInterface(); AmmoboxAmmoIconInterface.SetState(AmmoboxAmmoUI); AmmoboxSwapUI = new AmmoSelectorUI(); AmmoboxSwapUI.Activate(); AmmoboxAmmoSwapInterface = new UserInterface(); AmmoboxAmmoSwapInterface.SetState(AmmoboxSwapUI); resetVariables(); }