Allow creating custom embedded documents of any type from the sheet, and add functionality to the aspect create button
This commit is contained in:
parent
134b13756a
commit
7d990fe64b
7 changed files with 52 additions and 48 deletions
|
|
@ -34,8 +34,10 @@ export class ActorHandler extends Actor {
|
|||
this.fn.genericEmbeddedDelete.bind(this)($event);
|
||||
};
|
||||
|
||||
async createCustomSpell($event) {
|
||||
if (!this.fn?.createCustomSpell) return;
|
||||
this.fn.createCustomSpell.bind(this)($event);
|
||||
async genericEmbeddedCreate($event) {
|
||||
const data = $event.currentTarget.dataset;
|
||||
console.log(data)
|
||||
if (!this.fn?.[`createCustom${data.embeddedCreate}`]) return;
|
||||
this.fn?.[`createCustom${data.embeddedCreate}`].bind(this)($event);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue