Migrate to FoundryVTT v13 AppV2 +

│ DataModels
│
│ - Reorganize DataModels into src/module/models/ (one .mjs per type)
│ - Create AppV2 actor/item sheets (HandlebarsApplicationMixin)…
This commit is contained in:
2026-04-19 10:54:43 +02:00
parent e3002dd602
commit 86b2cd5777
30 changed files with 445 additions and 1679 deletions

View File

@@ -38,7 +38,7 @@ export default class MGT2ActorSheet extends HandlebarsApplicationMixin(foundry.a
return this._sheetMode === this.constructor.SHEET_MODES.EDIT;
}
tabGroups = { primary: "stats" }
tabGroups = { sidebar: "health" }
/** @override */
async _prepareContext() {
@@ -66,6 +66,9 @@ export default class MGT2ActorSheet extends HandlebarsApplicationMixin(foundry.a
/** @override */
_onRender(context, options) {
super._onRender(context, options);
// Inject theme class dynamically (can't use game.settings in static DEFAULT_OPTIONS)
const theme = game.settings.get("mgt2", "theme");
if (theme) this.element.classList.add(theme);
this._activateTabGroups();
}