2021-07-08 10:12:12 +02:00
|
|
|
/**
|
|
|
|
* 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 = [
|
2021-11-07 20:23:02 +01:00
|
|
|
// ACTORS
|
|
|
|
"systems/bol/templates/actor/parts/actor-header.hbs",
|
|
|
|
"systems/bol/templates/actor/parts/tabs/actor-stats.hbs",
|
|
|
|
"systems/bol/templates/actor/parts/tabs/actor-combat.hbs",
|
2021-12-24 16:06:26 +01:00
|
|
|
"systems/bol/templates/actor/parts/tabs/actor-actions.hbs",
|
2021-11-07 20:23:02 +01:00
|
|
|
"systems/bol/templates/actor/parts/tabs/actor-features.hbs",
|
|
|
|
"systems/bol/templates/actor/parts/tabs/actor-equipment.hbs",
|
2022-01-23 09:25:09 +01:00
|
|
|
"systems/bol/templates/actor/parts/tabs/actor-spellalchemy.hbs",
|
2022-02-18 18:19:44 +01:00
|
|
|
"systems/bol/templates/actor/parts/tabs/actor-biodata.hbs",
|
2022-04-10 16:38:09 +02:00
|
|
|
"systems/bol/templates/actor/parts/tabs/creature-stats.hbs",
|
|
|
|
"systems/bol/templates/actor/parts/tabs/creature-actions.hbs",
|
2021-11-07 20:23:02 +01:00
|
|
|
// ITEMS
|
|
|
|
"systems/bol/templates/item/parts/item-header.hbs",
|
|
|
|
"systems/bol/templates/item/parts/properties/feature-properties.hbs",
|
2021-11-08 14:40:29 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/item-properties.hbs",
|
2021-12-22 05:12:40 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/item/equipment-properties.hbs",
|
2022-01-05 22:46:26 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/item/capacity-properties.hbs",
|
2021-12-24 16:06:26 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/item/vehicle-properties.hbs",
|
2021-12-22 05:12:40 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/item/protection-properties.hbs",
|
|
|
|
"systems/bol/templates/item/parts/properties/item/weapon-properties.hbs",
|
2022-01-09 14:52:24 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/item/spell-properties.hbs",
|
2022-01-23 09:25:09 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/item/alchemy-properties.hbs",
|
2021-12-24 04:51:14 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/item/magical-properties.hbs",
|
2021-12-22 05:12:40 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/feature/career-properties.hbs",
|
|
|
|
"systems/bol/templates/item/parts/properties/feature/boon-properties.hbs",
|
|
|
|
"systems/bol/templates/item/parts/properties/feature/flaw-properties.hbs",
|
|
|
|
"systems/bol/templates/item/parts/properties/feature/origin-properties.hbs",
|
|
|
|
"systems/bol/templates/item/parts/properties/feature/race-properties.hbs",
|
2022-03-10 21:05:53 +01:00
|
|
|
"systems/bol/templates/item/parts/properties/feature/fightoption-properties.hbs",
|
2022-01-16 22:06:49 +01:00
|
|
|
|
2021-11-08 14:40:29 +01:00
|
|
|
// DIALOGS
|
2022-01-17 23:50:57 +01:00
|
|
|
"systems/bol/templates/chat/rolls/attack-damage-card.hbs",
|
2022-01-23 09:25:09 +01:00
|
|
|
"systems/bol/templates/chat/rolls/spell-roll-card.hbs",
|
|
|
|
"systems/bol/templates/chat/rolls/alchemy-roll-card.hbs",
|
2022-01-16 22:06:49 +01:00
|
|
|
"systems/bol/templates/dialogs/aptitude-roll-part.hbs",
|
|
|
|
"systems/bol/templates/dialogs/attribute-roll-part.hbs",
|
|
|
|
"systems/bol/templates/dialogs/mod-roll-part.hbs",
|
|
|
|
"systems/bol/templates/dialogs/adv-roll-part.hbs",
|
|
|
|
"systems/bol/templates/dialogs/career-roll-part.hbs",
|
2022-02-18 21:58:53 +01:00
|
|
|
"systems/bol/templates/dialogs/boons-roll-part.hbs",
|
|
|
|
"systems/bol/templates/dialogs/flaws-roll-part.hbs",
|
2022-03-10 21:05:53 +01:00
|
|
|
"systems/bol/templates/dialogs/total-roll-part.hbs",
|
|
|
|
"systems/bol/templates/dialogs/fightoptions-roll-part.hbs",
|
2021-07-08 10:12:12 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
// Load the template parts
|
|
|
|
return loadTemplates(templatePaths);
|
|
|
|
};
|