fix tech sheet

This commit is contained in:
Vlyan
2023-03-15 15:01:40 +01:00
parent 823b883d4e
commit a24e775001
8 changed files with 81 additions and 46 deletions

View File

@@ -9,7 +9,7 @@ export class ItemL5r5e extends Item {
/**
* Return the linked Actor instance if any (current or embed)
* @return {Actor|null}
* @return {ActorL5r5e|null}
*/
get actor() {
return super.actor || game.actors.get(this.system.parent_id?.actor_id) || null;
@@ -61,7 +61,11 @@ export class ItemL5r5e extends Item {
*/
static async create(data, context = {}) {
if (data.img === undefined) {
data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`;
if (data.type === 'technique') {
data.img = `${CONFIG.l5r5e.paths.assets}icons/techs/kata.svg`;
} else {
data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`;
}
}
return super.create(data, context);
}