Implement the ability to create AE's (closes #177)
This commit is contained in:
parent
ec6378092f
commit
dbeb511bdc
3 changed files with 12 additions and 1 deletions
|
|
@ -58,6 +58,14 @@ export class UntypedItemSheet extends GenericItemSheet {
|
|||
if (!this.isEditable) return;
|
||||
console.debug(`.dungeon | Adding event listeners for Untyped Item: ${this.item.id}`);
|
||||
|
||||
html.find(`.create-ae`).on(`click`, async () => {
|
||||
await this.item.createEmbeddedDocuments(
|
||||
`ActiveEffect`,
|
||||
[{name: localizer(`dotdungeon.default.name`, { document: `ActiveEffect`, type: `base` })}],
|
||||
{ renderSheet: true }
|
||||
);
|
||||
});
|
||||
|
||||
new GenericContextMenu(html, `.effect.panel`, [
|
||||
{
|
||||
name: localizer(`dotdungeon.common.edit`),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue