mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 12:54:16 +02:00
Fix when opening tag teams or group rolls for different parties
This commit is contained in:
parent
6d3ded0503
commit
129fb00baa
3 changed files with 4 additions and 7 deletions
|
|
@ -343,7 +343,7 @@ Hooks.on(CONFIG.DH.HOOKS.hooksConfig.tagTeamStart, async data => {
|
||||||
if (!party) return;
|
if (!party) return;
|
||||||
|
|
||||||
const TagTeamDialog = game.system.api.applications.dialogs.TagTeamDialog;
|
const TagTeamDialog = game.system.api.applications.dialogs.TagTeamDialog;
|
||||||
const dialog = foundry.applications.instances.get(TagTeamDialog.DEFAULT_OPTIONS.id) ?? new TagTeamDialog(party);
|
const dialog = foundry.applications.instances.get(`TagTeamDialog-${party.id}`) ?? new TagTeamDialog(party);
|
||||||
dialog.tabGroups.application = 'tagTeamRoll';
|
dialog.tabGroups.application = 'tagTeamRoll';
|
||||||
await dialog.render({ force: true });
|
await dialog.render({ force: true });
|
||||||
}
|
}
|
||||||
|
|
@ -355,8 +355,7 @@ Hooks.on(CONFIG.DH.HOOKS.hooksConfig.groupRollStart, async data => {
|
||||||
if (!party) return;
|
if (!party) return;
|
||||||
|
|
||||||
const GroupRollDialog = game.system.api.applications.dialogs.GroupRollDialog;
|
const GroupRollDialog = game.system.api.applications.dialogs.GroupRollDialog;
|
||||||
const dialog =
|
const dialog = foundry.applications.instances.get(`GroupRollDialog-${party.id}`) ?? new GroupRollDialog(party);
|
||||||
foundry.applications.instances.get(GroupRollDialog.DEFAULT_OPTIONS.id) ?? new GroupRollDialog(party);
|
|
||||||
dialog.tabGroups.application = 'groupRoll';
|
dialog.tabGroups.application = 'groupRoll';
|
||||||
await dialog.render({ force: true });
|
await dialog.render({ force: true });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
export default class GroupRollDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
export default class GroupRollDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
constructor(party) {
|
constructor(party) {
|
||||||
super();
|
super({ id: `GroupRollDialog-${party.id}` });
|
||||||
|
|
||||||
this.party = party;
|
this.party = party;
|
||||||
this.partyMembers = party.system.partyMembers
|
this.partyMembers = party.system.partyMembers
|
||||||
|
|
@ -35,7 +35,6 @@ export default class GroupRollDialog extends HandlebarsApplicationMixin(Applicat
|
||||||
|
|
||||||
static DEFAULT_OPTIONS = {
|
static DEFAULT_OPTIONS = {
|
||||||
tag: 'form',
|
tag: 'form',
|
||||||
id: 'GroupRollDialog',
|
|
||||||
classes: ['daggerheart', 'views', 'dh-style', 'dialog', 'group-roll-dialog'],
|
classes: ['daggerheart', 'views', 'dh-style', 'dialog', 'group-roll-dialog'],
|
||||||
position: { width: 390, height: 'auto' },
|
position: { width: 390, height: 'auto' },
|
||||||
window: {
|
window: {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ const { HandlebarsApplicationMixin, ApplicationV2 } = foundry.applications.api;
|
||||||
|
|
||||||
export default class TagTeamDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
export default class TagTeamDialog extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
constructor(party) {
|
constructor(party) {
|
||||||
super();
|
super({ id: `TagTeamDialog-${party.id}` });
|
||||||
|
|
||||||
this.party = party;
|
this.party = party;
|
||||||
this.partyMembers = party.system.partyMembers
|
this.partyMembers = party.system.partyMembers
|
||||||
|
|
@ -36,7 +36,6 @@ export default class TagTeamDialog extends HandlebarsApplicationMixin(Applicatio
|
||||||
|
|
||||||
static DEFAULT_OPTIONS = {
|
static DEFAULT_OPTIONS = {
|
||||||
tag: 'form',
|
tag: 'form',
|
||||||
id: 'TagTeamDialog',
|
|
||||||
classes: ['daggerheart', 'views', 'dh-style', 'dialog', 'tag-team-dialog'],
|
classes: ['daggerheart', 'views', 'dh-style', 'dialog', 'tag-team-dialog'],
|
||||||
position: { width: 550, height: 'auto' },
|
position: { width: 550, height: 'auto' },
|
||||||
actions: {
|
actions: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue