Skip to content

Commit

Permalink
Fix #27
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVauxs committed Jan 16, 2024
1 parent ae73001 commit 9a6544c
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/summon/summon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {} },
Expand All @@ -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, {
Expand Down

0 comments on commit 9a6544c

Please sign in to comment.