What's Changed
- API: Added registerActorTab API to allow registering tabs to all Tidy-supported actor types by @kgar in #209
- Added World scripter compatibility to world scripts, added Beaver's Crafting world script by @kgar in #208
- [#131] Added hooks, attributes, and other support for Rarity Colors by @kgar in #212
- Issue 200 item description secrets by @kgar in #205
- [#213] Fixed item sheet issue with buttons disabling for observer users by @kgar in #214
- [#210] Actors and Items: added hooks for preSelectTab (with ability to prevent tab selection) and selectTab by @kgar in #215
Full Changelog: v0.2.2...v0.2.3
Preparing the Way
I've made numerous under-the-hood changes to the sheets to prepare for module compatibility. More on that, soon.
Fixes
- Observe. When viewing an Item sheet as an observer, numerous things were not interactable (e.g., switching tabs). This has been fixed.
- Keep Your Secrets... Or Reveal Them. Item sheet secrets now feature the Reveal/Hide button and function as intended.
World Scripter compatibility
All world scripts featured in this repo now have World Scripter compatibility baked in.
For the Devs
- Register a tab for all actor types.
registerActorTabis now available. This allows for registering a tab with all actor types. This is useful for modules like Beaver's Crafting, which can have a crafting tab on any actor sheet. - Item Table Row and Field Selectors. Numerous Tidy-specific selectors now exist for targeting item table rows, item names, and almost any editable field. For fields, you will now see
data-tidy-field="property.path.here". These sheets are intentionally not submitting all fields when saving individual changes, so an alternate selector was required for targeting Tidy fields, as opposed toname="property.path.here". - Tab Selection Hooks. When selecting an actor or item tab, there are now these hooks:
tidy5e-sheet.preSelectTabapp: Sheet, sheetElement: HTMLElement, { currentTab: string, newTab: string }- is called before a tab change is allowed. Returnfalseto prevent the tab from changing.tidy5e-sheet.selectTabapp: Sheet, sheetElement: HTMLElement, tab: string- notifies when a new tab has been selected