Example #1
0
 private void Player_QuickSpawnItem_int_int(On.Terraria.Player.orig_QuickSpawnItem_int_int orig, Terraria.Player self, int item, int stack)
 {
     if (!TreasureBagValueCalculator.Loading)
     {
         orig(self, item, stack);
     }
     else
     {
         TreasureBagValueCalculator.HandleQuickSpawnItem(self, item, stack);
     }
 }
Example #2
0
        public override void Load()
        {
            base.Load();
            LoadingHelper.Load();

            Instance  = ModContent.GetInstance <PboneUtils>();
            textures  = new ModTextureManager();
            recipes   = new ModRecipeManager();
            ui        = new ModUIManager();
            bagValues = new TreasureBagValueCalculator();

            modPacketManager = new ModPacketManager(this);
            crossModManager  = new CrossModManager();
            crossModManager.Load();

            Load_IL();
            Load_On();
            textures.Initialize();
            ui.Initialize();
        }
Example #3
0
        public override void Unload()
        {
            base.Unload();
            if (textures != null)
            {
                textures.Dispose();
            }
            if (bagValues != null)
            {
                bagValues.Unload();
            }

            Instance = null;

            textures         = null;
            recipes          = null;
            ui               = null;
            bagValues        = null;
            crossModManager  = null;
            modPacketManager = null;
        }