Fix image's behavior on create for all items sub classes
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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 || {};
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user