Refactor the way of symbols was handled, now compatible with "monks enhanced journal".

This commit is contained in:
Vlyan
2022-04-19 19:27:42 +02:00
parent 93e2bd23f8
commit 597c5a0b49
25 changed files with 38 additions and 90 deletions

View File

@@ -200,6 +200,12 @@ Hooks.once("init", async () => {
makeDefault: true,
});
// Override enrichHTML for Symbol replacement
const oldEnrichHTML = TextEditor.prototype.constructor.enrichHTML;
TextEditor.prototype.constructor.enrichHTML = function (content, options = {}) {
return HelpersL5r5e.convertSymbols(oldEnrichHTML.call(this, content, options), true);
};
// Override the default Token _drawBar function to allow fatigue bar reversing.
Token.prototype._drawBar = function (number, bar, data) {
const reverseBar = data.attribute === "fatigue" && game.settings.get("l5r5e", "token-reverseFatigueBar");