From e0e70d126f5b9dfc0abc2029421a80a56014542f Mon Sep 17 00:00:00 2001 From: macniel Date: Sun, 16 Nov 2025 11:52:56 +0100 Subject: [PATCH] fix faulty tab config on creatureSheet --- src/module/sheets/creatureSheet.mjs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/module/sheets/creatureSheet.mjs b/src/module/sheets/creatureSheet.mjs index 87aafffa..895dc9e2 100644 --- a/src/module/sheets/creatureSheet.mjs +++ b/src/module/sheets/creatureSheet.mjs @@ -25,7 +25,6 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) { static TABS = { sheet: { tabs: [], - initial: 'meta' } } @@ -66,6 +65,19 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) { tabs.tabs.push(tab) } } + + if (!game.user.isGM) { + if (this.document.system.visibility.meta) { + tabs.initial = 'meta' + } else if (this.document.system.visibility.attacks) { + tabs.initial = 'attacks' + } else if (this.document.system.visibility.description) { + tabs.initial = 'description' + } else if (this.document.system.visibility.loot) { + tabs.initial = 'loot' + } + } + return tabs }