Fix image's behavior on create for all items sub classes

This commit is contained in:
Vlyan
2021-02-01 17:51:27 +01:00
parent 68577737fc
commit 4350506e09
3 changed files with 10 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
# Changelog # Changelog
## 1.2.0 - Roll n Keep
- Added Roll n Keep 1st iteration
- Fix image's behavior on create for all items sub classes
## 1.1.2 - One Compendium to bring them all ## 1.1.2 - One Compendium to bring them all
- Added compendiums (Thanks to Stéfano Fara for the English version !) Partial for French as PoW and CR are not translated yet - Added compendiums (Thanks to Stéfano Fara for the English version !) Partial for French as PoW and CR are not translated yet
- Shadowlands - Shadowlands

View File

@@ -12,7 +12,9 @@ export class ActorL5r5e extends Actor {
// } // }
// Replace default image // Replace default image
data.img = `${CONFIG.l5r5e.paths.assets}icons/actors/${data.type}.svg`; if (data.img === undefined) {
data.img = `${CONFIG.l5r5e.paths.assets}icons/actors/${data.type}.svg`;
}
// Some tweak on actors token // Some tweak on actors token
data.token = data.token || {}; data.token = data.token || {};

View File

@@ -4,7 +4,9 @@ export class ItemL5r5e extends Item {
* @override * @override
*/ */
static async create(data, options = {}) { static async create(data, options = {}) {
data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`; if (data.img === undefined) {
data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`;
}
return super.create(data, options); return super.create(data, options);
} }
} }