This commit is contained in:
Vlyan
2020-12-08 19:54:37 +01:00
parent c570193a9e
commit 0331ba2854
2 changed files with 6 additions and 3 deletions

View File

@@ -110,12 +110,10 @@ export class RollL5r5e extends Roll {
// Add L5R summary
if (this.l5r5e.dicesTypes.l5r) {
const summary = this.l5r5e.summary;
// TODO i18n lang trad or symbols
total +=
(this.l5r5e.dicesTypes.std ? " | " : "") +
["success", "explosive", "opportunity", "strife"]
.map((props) => (summary[props] > 0 ? props + ": " + summary[props] : null))
.map((props) => (summary[props] > 0 ? `<i class="${props}"></i> ${summary[props]}` : null))
.filter((c) => !!c)
.join(" | ");
}

View File

@@ -57,6 +57,11 @@ Hooks.once("init", async function () {
Items.registerSheet("l5r5e", WeaponSheetL5r5e, { types: ["weapon"], makeDefault: true });
Items.registerSheet("l5r5e", FeatSheetL5r5e, { types: ["feat"], makeDefault: true });
// for debug
Handlebars.registerHelper("json", function (object) {
return new Handlebars.SafeString(JSON.stringify(object));
});
Handlebars.registerHelper("localizeSkillCategory", function (skillName) {
const key = "L5r5e.Skills." + skillName + ".Title";
return game.i18n.localize(key);