Fix specificity always displayed in skill tab.
This commit is contained in:
@@ -177,7 +177,7 @@
|
|||||||
"school_ability": "School Ability",
|
"school_ability": "School Ability",
|
||||||
"mastery_ability": "Mastery Ability",
|
"mastery_ability": "Mastery Ability",
|
||||||
"title_ability": "Title Ability",
|
"title_ability": "Title Ability",
|
||||||
"specificity": "Specificities"
|
"specificity": "Specificity"
|
||||||
},
|
},
|
||||||
"peculiarities": {
|
"peculiarities": {
|
||||||
"types": {
|
"types": {
|
||||||
|
|||||||
@@ -177,7 +177,7 @@
|
|||||||
"school_ability": "Capacidad de escuela",
|
"school_ability": "Capacidad de escuela",
|
||||||
"mastery_ability": "Habilidad de maestría",
|
"mastery_ability": "Habilidad de maestría",
|
||||||
"title_ability": "Title Ability",
|
"title_ability": "Title Ability",
|
||||||
"specificity": "Specificities"
|
"specificity": "Specificity"
|
||||||
},
|
},
|
||||||
"peculiarities": {
|
"peculiarities": {
|
||||||
"types": {
|
"types": {
|
||||||
|
|||||||
@@ -177,7 +177,7 @@
|
|||||||
"school_ability": "Capacité d'école",
|
"school_ability": "Capacité d'école",
|
||||||
"mastery_ability": "Capacité de maîtrise",
|
"mastery_ability": "Capacité de maîtrise",
|
||||||
"title_ability": "Capacité de Titre",
|
"title_ability": "Capacité de Titre",
|
||||||
"specificity": "Particularités"
|
"specificity": "Particularité"
|
||||||
},
|
},
|
||||||
"peculiarities": {
|
"peculiarities": {
|
||||||
"types": {
|
"types": {
|
||||||
|
|||||||
@@ -49,9 +49,11 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
.map(([id, cfg]) => id);
|
.map(([id, cfg]) => id);
|
||||||
|
|
||||||
// Build the list order
|
// Build the list order
|
||||||
Array.from(CONFIG.l5r5e.techniques).forEach(([id, cfg]) => {
|
Array.from(CONFIG.l5r5e.techniques)
|
||||||
out[id] = [];
|
.filter(([id, cfg]) => cfg.type !== "custom" || game.settings.get("l5r5e", "techniques-customs"))
|
||||||
});
|
.forEach(([id, cfg]) => {
|
||||||
|
out[id] = [];
|
||||||
|
});
|
||||||
|
|
||||||
// Add tech the character knows
|
// Add tech the character knows
|
||||||
sheetData.items.forEach((item) => {
|
sheetData.items.forEach((item) => {
|
||||||
@@ -380,12 +382,12 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
img: `${CONFIG.l5r5e.paths.assets}icons/items/${type}.svg`,
|
img: `${CONFIG.l5r5e.paths.assets}icons/items/${type}.svg`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
if (created?.length > 0) {
|
if (created?.length < 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const item = this.actor.items.get(created[0].id);
|
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) {
|
if (this.actor.data.data.identity?.school_rank) {
|
||||||
item.data.data.bought_at_rank = 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)) {
|
if (["advancement", "technique"].includes(item.data.type)) {
|
||||||
@@ -401,10 +403,11 @@ export class BaseSheetL5r5e extends ActorSheet {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "technique": {
|
case "technique": {
|
||||||
// If technique, select the current type
|
// If technique, select the current sub-type
|
||||||
if (CONFIG.l5r5e.techniques.get(techniqueType)) {
|
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.img = `${CONFIG.l5r5e.paths.assets}icons/techs/${techniqueType}.svg`;
|
||||||
|
item.data.data.technique_type = techniqueType;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user