8: Add rolls to items on actor sheets

- Utilized the revisions made to roll syntax to allow for rollable
  buttons on item lists on actor sheets. Rolls are evaluated using
  `@items.ITEM.KEY`, where ITEM is the item name (slugified), and KEY is
  an attribute key for a formula attribute.
This commit is contained in:
Matt Smith 2020-08-09 16:37:16 -05:00
parent 00dfec6014
commit 786d4095a9
5 changed files with 29 additions and 0 deletions

View file

@ -82,4 +82,11 @@ Hooks.once("init", async function() {
}
}
/**
* Slugify a string.
*/
Handlebars.registerHelper('slugify', function(value) {
return value.slugify({strict: true});
});
});