From 9a6544c133e175402c9e99630987c7b91135cd4c Mon Sep 17 00:00:00 2001 From: mrvauxs Date: Tue, 16 Jan 2024 23:55:32 +0000 Subject: [PATCH] Fix #27 --- src/summon/summon.js | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/summon/summon.js b/src/summon/summon.js index 5ce355d..63d86d3 100644 --- a/src/summon/summon.js +++ b/src/summon/summon.js @@ -113,18 +113,6 @@ async function summon(data) { token = { flags: {} }; } - Object.assign(token.flags, { - 'foundry-summons': { - scrollingText: game.settings.get('core', 'scrollingStatusText'), - bloodsplatter: game.modules.get('splatter')?.active - ? game.settings.get('splatter', 'enableBloodsplatter') - : null, - 'token-mold': game.modules.get('token-mold')?.active - ? game.settings.get('Token-Mold', 'everyone').name.use - : null, - }, - }); - const updates = { token: token.toObject ? token.toObject() : { flags: {} }, actor: actor.toObject ? actor.toObject() : { flags: {} }, @@ -135,6 +123,16 @@ async function summon(data) { updates.token.actorData = { ownership: { [data.userId]: 3 } }; + updates.token.flags['foundry-summons'] = { + scrollingText: game.settings.get('core', 'scrollingStatusText'), + bloodsplatter: game.modules.get('splatter')?.active + ? game.settings.get('splatter', 'enableBloodsplatter') + : null, + 'token-mold': game.modules.get('token-mold')?.active + ? game.settings.get('Token-Mold', 'everyone').name.use + : null, + }; + const callbacks = { pre: async function (_location, _updates) { mergeObject(_updates, {