fvtt-imperium5/modules/imperium5-item.js

25 lines
770 B
JavaScript
Raw Permalink Normal View History

2022-03-13 16:17:04 +01:00
export const defaultItemImg = {
2022-03-22 09:01:20 +01:00
archetype: "systems/fvtt-imperium5/images/icons/archetype_transparent.webp",
familiarite: "systems/fvtt-imperium5/images/icons/archetype_transparent.webp",
specialite: "systems/fvtt-imperium5/images/icons/archetype_transparent.webp",
nature: "systems/fvtt-imperium5/images/icons/nature_transparent.webp",
trait: "systems/fvtt-imperium5/images/icons/nature_transparent.webp",
symbiose: "systems/fvtt-imperium5/images/icons/nature_transparent.webp",
2022-03-13 16:17:04 +01:00
}
/**
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
*/
2022-03-19 09:30:00 +01:00
export class Imperium5Item extends Item {
2022-03-13 16:17:04 +01:00
constructor(data, context) {
if (!data.img) {
2022-03-19 09:30:00 +01:00
data.img = defaultItemImg[data.type]
2022-03-13 16:17:04 +01:00
}
2022-03-19 09:30:00 +01:00
super(data, context)
2022-03-13 16:17:04 +01:00
}
}