Skip to content

Commit

Permalink
feat(item-sheet): added the effects system on the item-sheet
Browse files Browse the repository at this point in the history
  • Loading branch information
SouOWendel committed Oct 25, 2023
1 parent db328f9 commit 40c6b8f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions module/sheets/item-sheet.mjs
@@ -1,3 +1,8 @@
import {
onManageActiveEffect,
prepareActiveEffectCategories,
} from '../helpers/effects.mjs';

/**
* Extend the basic ItemSheet with some very simple modifications
* @extends {ItemSheet}
Expand Down Expand Up @@ -56,6 +61,10 @@ export class OrdemItemSheet extends ItemSheet {
context.data = itemData.data;
context.flags = itemData.flags;

// Prepare active effects
context.effects = prepareActiveEffectCategories(this.item.effects);
console.log(context.effects);

return context;
}

Expand All @@ -68,6 +77,10 @@ export class OrdemItemSheet extends ItemSheet {
// Everything below here is only needed if the sheet is editable
if (!this.isEditable) return;

html.find('.effect-control').click((ev) =>
onManageActiveEffect(ev, this.item),
);

// Roll handlers, click handlers, etc. would go here.
}
}

0 comments on commit 40c6b8f

Please sign in to comment.