Make it so that the GM can change a user's group when the user cannot change their own group

This commit is contained in:
Oliver-Akins 2023-12-23 20:05:43 -07:00
parent 00c28d5bb0
commit 89e3a14ba9
2 changed files with 3 additions and 1 deletions

View file

@ -15,6 +15,8 @@ export class GenericSheet extends ActorSheet {
ctx.settings[setting] = game.settings.get(`dotdungeon`, setting); ctx.settings[setting] = game.settings.get(`dotdungeon`, setting);
}; };
ctx.isGM = game.users.current.hasRole(CONST.USER_ROLES.ASSISTANT);
return ctx; return ctx;
} }
} }

View file

@ -59,7 +59,7 @@ export class PlayerSheet extends GenericSheet {
ctx.computed = { ctx.computed = {
syncTotal: this.#syncValue(), syncTotal: this.#syncValue(),
canChangeGroup: ctx.settings.playersCanChangeGroup, canChangeGroup: ctx.settings.playersCanChangeGroup || ctx.isGM,
}; };
console.groupCollapsed(`PlayerSheet.getData`); console.groupCollapsed(`PlayerSheet.getData`);