This refactor is still a WIP as I've finished Buffs/Debuffs but Consumes are still being worked on. However I wanted to get feedback on the new structure before fully committing.
Key Changes
I'm trying to break out ui/core/components/icon_inputs.ts into separate files because of how large it is currently. I've moved all buff/debuffs/world buff definitions into ui/core/components/inputs/buffs_debuffs.ts and consumables to ui/core/components/inputs/consumables.ts. This file still seems like a good place to keep the various helper functions in there now.
There was a lack of flexibility in using different pickers for various buffs/debuffs, so I've created a new type StatOption to extend the current functionality. To use this, you provide config for a given buff/debuff/consume, picker to specify the type of picker you want to use, and stats to specify the relevant stats the buff applies to. These are then filtered to only include relevant buffs.
This refactor is still a WIP as I've finished Buffs/Debuffs but Consumes are still being worked on. However I wanted to get feedback on the new structure before fully committing.
Key Changes
ui/core/components/icon_inputs.ts
into separate files because of how large it is currently. I've moved all buff/debuffs/world buff definitions intoui/core/components/inputs/buffs_debuffs.ts
and consumables toui/core/components/inputs/consumables.ts
. This file still seems like a good place to keep the various helper functions in there now.StatOption
to extend the current functionality. To use this, you provideconfig
for a given buff/debuff/consume,picker
to specify the type of picker you want to use, andstats
to specify the relevant stats the buff applies to. These are then filtered to only include relevant buffs.