diff --git a/system/lang/en-en.json b/system/lang/en-en.json index d801280..b806c26 100644 --- a/system/lang/en-en.json +++ b/system/lang/en-en.json @@ -177,7 +177,7 @@ "school_ability": "School Ability", "mastery_ability": "Mastery Ability", "title_ability": "Title Ability", - "specificity": "Specificities" + "specificity": "Specificity" }, "peculiarities": { "types": { diff --git a/system/lang/es-es.json b/system/lang/es-es.json index 5d38090..580e79c 100644 --- a/system/lang/es-es.json +++ b/system/lang/es-es.json @@ -177,7 +177,7 @@ "school_ability": "Capacidad de escuela", "mastery_ability": "Habilidad de maestría", "title_ability": "Title Ability", - "specificity": "Specificities" + "specificity": "Specificity" }, "peculiarities": { "types": { diff --git a/system/lang/fr-fr.json b/system/lang/fr-fr.json index 04ab8a3..78f6a4f 100644 --- a/system/lang/fr-fr.json +++ b/system/lang/fr-fr.json @@ -177,7 +177,7 @@ "school_ability": "Capacité d'école", "mastery_ability": "Capacité de maîtrise", "title_ability": "Capacité de Titre", - "specificity": "Particularités" + "specificity": "Particularité" }, "peculiarities": { "types": { diff --git a/system/scripts/actors/base-sheet.js b/system/scripts/actors/base-sheet.js index f0d291d..22b747f 100644 --- a/system/scripts/actors/base-sheet.js +++ b/system/scripts/actors/base-sheet.js @@ -49,9 +49,11 @@ export class BaseSheetL5r5e extends ActorSheet { .map(([id, cfg]) => id); // Build the list order - Array.from(CONFIG.l5r5e.techniques).forEach(([id, cfg]) => { - out[id] = []; - }); + Array.from(CONFIG.l5r5e.techniques) + .filter(([id, cfg]) => cfg.type !== "custom" || game.settings.get("l5r5e", "techniques-customs")) + .forEach(([id, cfg]) => { + out[id] = []; + }); // Add tech the character knows sheetData.items.forEach((item) => { @@ -380,12 +382,12 @@ export class BaseSheetL5r5e extends ActorSheet { img: `${CONFIG.l5r5e.paths.assets}icons/items/${type}.svg`, }, ]); - if (created?.length > 0) { + if (created?.length < 1) { return; } const item = this.actor.items.get(created[0].id); - // assign current school rank to the new adv/tech + // Assign current school rank to the new adv/tech if (this.actor.data.data.identity?.school_rank) { item.data.data.bought_at_rank = this.actor.data.data.identity.school_rank; if (["advancement", "technique"].includes(item.data.type)) { @@ -401,10 +403,11 @@ export class BaseSheetL5r5e extends ActorSheet { break; case "technique": { - // If technique, select the current type + // If technique, select the current sub-type if (CONFIG.l5r5e.techniques.get(techniqueType)) { - item.data.data.technique_type = techniqueType; + item.data.name = game.i18n.localize(`l5r5e.techniques.${techniqueType}`); item.data.img = `${CONFIG.l5r5e.paths.assets}icons/techs/${techniqueType}.svg`; + item.data.data.technique_type = techniqueType; } break; }