Working on Compatibility for FVTT v10

Removed restriction on technique types on drop (Sheet and 20Q).
Again some missing data->system
This commit is contained in:
Vlyan
2022-07-23 00:02:47 +02:00
parent 8514064722
commit c7476a42c2
11 changed files with 31 additions and 35 deletions

View File

@@ -64,12 +64,6 @@ export const RegisterHandlebars = function () {
return objects.join("");
});
// enrichHTML
Handlebars.registerHelper("enrichHTML", function (text, options = {}) {
options.async = false;
return TextEditor.enrichHTML(text, options);
});
// Add a setter
Handlebars.registerHelper("setVar", function (varName, varValue, options) {
options.data.root[varName] = varValue;
@@ -77,8 +71,8 @@ export const RegisterHandlebars = function () {
/**
* Utility conditional, usable in nested expression
* {{#ifCond (ifCond advancement.type '==' 'technique') '||' (ifCond item.data.technique_type '==' 'kata')}}
* {{#ifCond '["distinction","passion"]' 'includes' item.data.peculiarity_type}}
* {{#ifCond (ifCond advancement.type '==' 'technique') '||' (ifCond item.system.technique_type '==' 'kata')}}
* {{#ifCond '["distinction","passion"]' 'includes' item.system.peculiarity_type}}
*/
Handlebars.registerHelper("ifCond", function (a, operator, b, options) {
let result = false;