Get the item embedding working in a cleaner way where most of the item embedding logic is handled in the item's class instead of the actor's class

This commit is contained in:
Oliver-Akins 2024-03-22 20:23:28 -06:00
parent 0605542d62
commit 18cdc2addc
4 changed files with 20 additions and 48 deletions

View file

@ -1,7 +1,7 @@
export class DotDungeonItem extends Item {
async _preCreate() {
async _preCreate(...args) {
if (this.isEmbedded) {
return await this.actor?.preItemEmbed(this);
return await this.actor?.preItemEmbed(...args);
};
};