Slightly refactor the weapon subcategory list building into a separate function
In this weapon subcategory function, detect the presence of CalamityMod, if present, split the melee weapon category into True Melee and Melee
Use a similar method to split summoner whips into a new category (this has nothing to do with calamity it was just annoying me)
Note:
Using the string representation of Item.Type isn't ideal (eg "CalamityMod.TrueMeleeDamageClass"), both for True melee and whips. In the case of whips I don't believe these exist as an enum field (if it did we would then be able to catch if it ever changed on tmodloader's side), and in the case of calamity it would be impossible to do anyway without adding that mod as a dependency.
I can understand if you don't want to add code that could potentially silently break on an update.
If that is the case, I would have to try publishing this change into a standalone compatibility mod between RecipeBrowser and Calamity.
Changes:
Note:
Using the string representation of Item.Type isn't ideal (eg "CalamityMod.TrueMeleeDamageClass"), both for True melee and whips. In the case of whips I don't believe these exist as an enum field (if it did we would then be able to catch if it ever changed on tmodloader's side), and in the case of calamity it would be impossible to do anyway without adding that mod as a dependency. I can understand if you don't want to add code that could potentially silently break on an update.
If that is the case, I would have to try publishing this change into a standalone compatibility mod between RecipeBrowser and Calamity.
Pictures of the changes follow: