mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Merged with main
This commit is contained in:
commit
d6acbcb281
16 changed files with 230 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
export { default as DhpActor } from './actor.mjs';
|
||||
export { default as DhpItem } from './item.mjs';
|
||||
export { default as DhpCombat } from './combat.mjs';
|
||||
export { default as DhActiveEffect } from './activeEffect.mjs';
|
||||
|
|
|
|||
14
module/documents/activeEffect.mjs
Normal file
14
module/documents/activeEffect.mjs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
export default class DhActiveEffect extends ActiveEffect {
|
||||
async _preCreate(data, options, user) {
|
||||
const update = {};
|
||||
if (!data.img) {
|
||||
update.img = 'icons/magic/life/heart-cross-blue.webp';
|
||||
}
|
||||
|
||||
if (Object.keys(update).length > 0) {
|
||||
await this.updateSource(update);
|
||||
}
|
||||
|
||||
await super._preCreate(data, options, user);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue