System development, WIP
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import MGNERoll from "./roll.mjs"
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
|
||||
export default class MGNEItem extends Item {
|
||||
prepareBaseData() {
|
||||
super.prepareBaseData()
|
||||
const fallbackIcon = SYSTEM.itemTypes[this.type]?.icon
|
||||
if (!fallbackIcon) return
|
||||
if (!this._source.img || this._source.img === "icons/svg/item-bag.svg") {
|
||||
this.updateSource({ img: fallbackIcon })
|
||||
}
|
||||
}
|
||||
|
||||
async rollUsage() {
|
||||
return MGNERoll.rollUsage(this)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user