Add the ability to import sections from AdiBags
Cidan opened this issue ยท 6 comments
Flow:
- Enable both addons
- Load the game
- Go to options screen in betterbags
- New menu item appears under Categories, Import from AdiBags
- Allow user to select which categories to import
- Do the magic and make it work :)
Here's a plugin to move Shadowlands stuff to separate categories. https://github.com/SpareSimian/BetterBagsShadowlands
I created a developer helper plugin just to see what data is being passed to the registered callback: https://github.com/SpareSimian/BetterBagsItemDumper
Issue #172 makes me think that many of my AdiBags exceptions might be better implemented as plugins like this. Some of my exceptions are Container (can be opened), Toys, Cosmetic (grey BoE items suitable for transmog that other wise end up in the Junk category), and various currencies like Anima.
I attempted a plugin and don't see how to get at the light blue text in an item's tooltip (eg. "Anima" or "Korthian Relic"). Is there an API to get at the various tooltip texts from RegisterCategoryFunction? In some cases I need to look at the "flavor" text that explains how to use an item.
I've got something working and will upload it for others shortly. I note that the plugin example uses "local addon" as the pointer to the BB addon. That bit me as I was copying and pasting addon:Print debugging statements from my other addons. I suggest using a different variable name in the example plugin. I used bb.
My own needs are simple as I have a single profile ("Default") and the data format looks simple. The plugin API is easy to use for this. (Except that it would be a an aux addon with a chat command instead of a plugin callback.) I'll try to cook something up soon.
Do others need something more complicated that works with multiple profiles?
A first cut at importing my AdiBags categories: https://github.com/SpareSimian/BetterBagsFromAdiBags
This requires commenting out line 54 in categories.lua. I think it's enough to check if the itemId there is a number.