mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 23:13:39 +02:00
Changed to use a world setting to store the active party id
This commit is contained in:
parent
fc60305a44
commit
104616bc3d
4 changed files with 23 additions and 7 deletions
|
|
@ -102,9 +102,7 @@ export default class DhActorDirectory extends foundry.applications.sidebar.tabs.
|
|||
const actor = game.actors.get(li.dataset.entryId);
|
||||
if (!actor) throw new Error('Unexpected missing actor');
|
||||
|
||||
const currentActiveParty = game.actors.find(x => x.type === 'party' && x.system.active);
|
||||
await currentActiveParty?.update({ 'system.active': false });
|
||||
await actor.update({ 'system.active': true });
|
||||
await game.settings.set(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.ActiveParty, actor.id);
|
||||
ui.actors.render();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue