actor classes
This commit is contained in:
@@ -49,7 +49,7 @@ TOTEM.skillCategories = {
|
||||
"animal": {
|
||||
"label":"TOTEM.skillCategory.animal"
|
||||
},
|
||||
"machine": {
|
||||
"tool": {
|
||||
"label":"TOTEM.skillCategory.machine"
|
||||
},
|
||||
"weapon": {
|
||||
@@ -58,7 +58,7 @@ TOTEM.skillCategories = {
|
||||
"survival": {
|
||||
"label":"TOTEM.skillCategory.survival"
|
||||
},
|
||||
"earth": {
|
||||
"world": {
|
||||
"label":"TOTEM.skillCategory.earth"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* 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() {
|
||||
return loadTemplates([
|
||||
|
||||
// Actor partials.
|
||||
"systems/totem/templates/actor/parts/actor-traits.html",
|
||||
"systems/totem/templates/actor/parts/actor-background.html",
|
||||
"systems/totem/templates/actor/parts/actor-skills.html",
|
||||
"systems/totem/templates/actor/parts/actor-items.html",
|
||||
"systems/totem/templates/actor/parts/actor-effects.html",
|
||||
]);
|
||||
};
|
||||
|
||||
|
||||
export const registerHandlebarsHelpers = function () {
|
||||
Handlebars.registerHelper('concat', (...args) => args.slice(0, -1).join(''));
|
||||
Handlebars.registerHelper('lower', e => e.toLocaleLowerCase());
|
||||
|
||||
Handlebars.registerHelper('toLowerCase', function(str) {
|
||||
return str.toLowerCase();
|
||||
});
|
||||
|
||||
// Ifis not equal
|
||||
Handlebars.registerHelper('ifne', function (v1, v2, options) {
|
||||
if (v1 !== v2) return options.fn(this);
|
||||
else return options.inverse(this);
|
||||
});
|
||||
|
||||
// if equal
|
||||
Handlebars.registerHelper('ife', function (v1, v2, options) {
|
||||
if (v1 === v2) return options.fn(this);
|
||||
else return options.inverse(this);
|
||||
});
|
||||
// if equal
|
||||
Handlebars.registerHelper('ifgt', function (v1, v2, options) {
|
||||
if (v1 > v2) return options.fn(this);
|
||||
else return options.inverse(this);
|
||||
});
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
export const registerHandlebarsHelpers = function () {
|
||||
Handlebars.registerHelper('concat', (...args) => args.slice(0, -1).join(''));
|
||||
Handlebars.registerHelper('lower', e => e.toLocaleLowerCase());
|
||||
|
||||
Handlebars.registerHelper('toLowerCase', function(str) {
|
||||
return str.toLowerCase();
|
||||
});
|
||||
|
||||
// Ifis not equal
|
||||
Handlebars.registerHelper('ifne', function (v1, v2, options) {
|
||||
if (v1 !== v2) return options.fn(this);
|
||||
else return options.inverse(this);
|
||||
});
|
||||
|
||||
// if equal
|
||||
Handlebars.registerHelper('ife', function (v1, v2, options) {
|
||||
if (v1 === v2) return options.fn(this);
|
||||
else return options.inverse(this);
|
||||
});
|
||||
// if equal
|
||||
Handlebars.registerHelper('ifgt', function (v1, v2, options) {
|
||||
if (v1 > v2) return options.fn(this);
|
||||
else return options.inverse(this);
|
||||
});
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
/**
|
||||
* 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() {
|
||||
return loadTemplates([
|
||||
|
||||
// Actor partials.
|
||||
"systems/totem/templates/actor/parts/actor-traits.html",
|
||||
"systems/totem/templates/actor/parts/actor-background.html",
|
||||
"systems/totem/templates/actor/parts/actor-skills.html",
|
||||
"systems/totem/templates/actor/parts/actor-items.html",
|
||||
"systems/totem/templates/actor/parts/actor-cephalie.html",
|
||||
"systems/totem/templates/actor/parts/actor-effects.html",
|
||||
]);
|
||||
};
|
||||
Reference in New Issue
Block a user