kgar / foundry-vtt-tidy-5e-sheets

D&D 5e sheet layouts for Foundry VTT, focused on a clean UI, user ergonomics, and extensibility.
https://kgar.github.io/foundry-vtt-tidy-5e-sheets/
MIT License
42 stars 14 forks source link

feat: Support subtypes for loot items #728

Closed Belodri closed 2 months ago

Belodri commented 2 months ago

Summary

When a world script or module adds subtypes to loot items, which usually don't have subtypes, the default dnd5e item sheet displays a select field for the subtype while the tidy item sheet doesn't. It'd be awesome for homebrewing and module development if tidy could support this the same way the default sheet does. And since this is a functionality the default item sheet offers, I don't think adding it to tidy would fall outside the scope of this module.

Example

Adding a new loot type with subtypes via a world script like this:

CONFIG.DND5E.lootTypes.ingredient = {
    label: "Ingredient",
    subtypes: {
        bodyPart: "Body Part",
        herb: "Herb"
    }
}

The default item sheet displays the selection field for the subtypes if the lootType has subtypes: image

And hides the selection field if the lootType doesn't have any subtypes: image

While the tidy item sheet never displays a selection field for the added subtypes: image

kgar commented 2 months ago

Tidy v5.6.0 🎉