mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Added optional summon render to chat message
This commit is contained in:
parent
47b9be0f01
commit
69da660bfa
8 changed files with 128 additions and 43 deletions
|
|
@ -94,11 +94,11 @@ export default class DhTokenManager {
|
|||
? await game.system.api.documents.DhpActor.create(this.#actor.toObject())
|
||||
: this.#actor;
|
||||
const tokenData = await actor.getTokenDocument();
|
||||
const token = await canvas.scene.createEmbeddedDocuments('Token', [
|
||||
const result = await canvas.scene.createEmbeddedDocuments('Token', [
|
||||
{ ...tokenData, x: this.#activePreview.document.x, y: this.#activePreview.document.y }
|
||||
]);
|
||||
|
||||
this.#activePreview = undefined;
|
||||
if (this.#resolve) this.#resolve(token);
|
||||
if (this.#resolve && result.length) this.#resolve(result[0]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue