Esempio n. 1
0
        public override void Unload()
        {
            if (!Main.dedServ)
            {
                concurrentTaskHandlerToken?.Cancel();
                concurrentTaskHandler?.Wait();
            }
            instance                   = null;
            translations               = null;
            itemChecklistInstance      = null;
            LootCache.instance         = null;
            ToggleRecipeBrowserHotKey  = null;
            QueryHoveredItemHotKey     = null;
            RecipeBrowserUI.instance   = null;
            RecipeCatalogueUI.instance = null;
            ItemCatalogueUI.instance   = null;
            BestiaryUI.instance        = null;
            CraftUI.instance           = null;
            RecipePath.Refresh(true);
            RecipeBrowserPlayer.seenTiles = null;

            UIElements.UIRecipeSlot.favoritedBackgroundTexture           = null;
            UIElements.UIRecipeSlot.selectedBackgroundTexture            = null;
            UIElements.UIRecipeSlot.ableToCraftBackgroundTexture         = null;
            UIElements.UIRecipeSlot.ableToCraftExtendedBackgroundTexture = null;
            UIElements.UIMockRecipeSlot.ableToCraftBackgroundTexture     = null;
            UIElements.UICheckbox.checkboxTexture  = null;
            UIElements.UICheckbox.checkmarkTexture = null;
            UIHorizontalGrid.moreLeftTexture       = null;
            UIHorizontalGrid.moreRightTexture      = null;
            Utilities.tileTextures = null;
        }
        public override void Unload()
        {
            instance                   = null;
            translations               = null;
            itemChecklistInstance      = null;
            LootCache.instance         = null;
            ToggleRecipeBrowserHotKey  = null;
            QueryHoveredItemHotKey     = null;
            RecipeBrowserUI.instance   = null;
            RecipeCatalogueUI.instance = null;
            ItemCatalogueUI.instance   = null;
            BestiaryUI.instance        = null;
            CraftUI.instance           = null;
            RecipePath.Refresh(true);
            RecipeBrowserPlayer.seenTiles = null;

            UIElements.UIRecipeSlot.favoritedBackgroundTexture           = null;
            UIElements.UIRecipeSlot.selectedBackgroundTexture            = null;
            UIElements.UIRecipeSlot.ableToCraftBackgroundTexture         = null;
            UIElements.UIRecipeSlot.ableToCraftExtendedBackgroundTexture = null;
            UIElements.UIMockRecipeSlot.ableToCraftBackgroundTexture     = null;
            UIElements.UICheckbox.checkboxTexture  = null;
            UIElements.UICheckbox.checkmarkTexture = null;
            UIHorizontalGrid.moreLeftTexture       = null;
            UIHorizontalGrid.moreRightTexture      = null;
            Utilities.tileTextures = null;

            if (harmonyInstance != null)
            {
                harmonyInstance.UnpatchAll(HarmonyID);
            }
        }