Fix image's behavior on create for all items sub classes
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# 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
|
||||
- Added compendiums (Thanks to Stéfano Fara for the English version !) Partial for French as PoW and CR are not translated yet
|
||||
- Shadowlands
|
||||
|
||||
@@ -12,7 +12,9 @@ export class ActorL5r5e extends Actor {
|
||||
// }
|
||||
|
||||
// Replace default image
|
||||
if (data.img === undefined) {
|
||||
data.img = `${CONFIG.l5r5e.paths.assets}icons/actors/${data.type}.svg`;
|
||||
}
|
||||
|
||||
// Some tweak on actors token
|
||||
data.token = data.token || {};
|
||||
|
||||
@@ -4,7 +4,9 @@ export class ItemL5r5e extends Item {
|
||||
* @override
|
||||
*/
|
||||
static async create(data, options = {}) {
|
||||
if (data.img === undefined) {
|
||||
data.img = `${CONFIG.l5r5e.paths.assets}icons/items/${data.type}.svg`;
|
||||
}
|
||||
return super.create(data, options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user