mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-04-30 02:31:41 -04:00
- 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.
16 lines
No EOL
450 B
JavaScript
16 lines
No EOL
450 B
JavaScript
/**
|
|
* 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);
|
|
}; |