mirror of
https://github.com/RoY7x/worldbuilding.git
synced 2025-07-05 06:00:42 -04:00
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:
parent
d3f030b4f7
commit
bac1d023c3
10 changed files with 270 additions and 85 deletions
16
module/templates.js
Normal file
16
module/templates.js
Normal 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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue