9: Add POC for actor templates

- This commit adds a proof-of-concept for retrieving actor template
  types. These are actors using the `worldbuilding.isTemplate` flag set
  to true. If there are multiple actors with that flag set to true,
  clicking the create actor button will pull up a prompt to choose from
  one of those types, which will then create an actor by duplicating
  the template actor's data. The flag will be unset on the new actor.
This commit is contained in:
Matt Smith 2020-08-31 02:09:21 +00:00 committed by Andrew
parent d3f030b4f7
commit bac1d023c3
10 changed files with 270 additions and 85 deletions

16
module/templates.js Normal file
View file

@ -0,0 +1,16 @@
/**
* Define a set of template paths to pre-load
* Pre-loaded templates are compiled and cached for fast access when rendering
* @return {Promise}
*/
export const preloadHandlebarsTemplates = async function() {
// Define template paths to load
const templatePaths = [
// Attribute list partial.
"systems/worldbuilding/templates/parts/sheet-attributes.html"
];
// Load the template parts
return loadTemplates(templatePaths);
};