61 lines
1.5 KiB
JavaScript
61 lines
1.5 KiB
JavaScript
import { prepareActiveEffectCategories } from "../helpers/utils.mjs";
|
|
import { systemPath } from "../constants.mjs";
|
|
import { M6ItemSheet } from "./item-sheet.mjs";
|
|
const { api, sheets } = foundry.applications;
|
|
|
|
/**
|
|
* Extend the basic ItemSheet with some very simple modifications.
|
|
*/
|
|
export class M6HintergrundSheet extends M6ItemSheet {
|
|
static get DEFAULT_OPTIONS() {
|
|
return {
|
|
...super.DEFAULT_OPTIONS, // Kopiert alle bestehenden Actions aus M6ItemSheet
|
|
actions: {
|
|
...super.DEFAULT_OPTIONS.actions,
|
|
},
|
|
};
|
|
}
|
|
|
|
static TABS = {
|
|
primary: {
|
|
tabs: [
|
|
{
|
|
id: "beschreibung",
|
|
icon: "fa-feather-pointed",
|
|
},
|
|
{
|
|
id: "effects",
|
|
icon: "fa-bolt",
|
|
},
|
|
],
|
|
initial: "beschreibung",
|
|
labelPrefix: "Midgard6.Sheets.Tabs",
|
|
},
|
|
};
|
|
|
|
/** @inheritdoc */
|
|
static PARTS = {
|
|
header: {
|
|
template: systemPath("templates/hintergrund/header.hbs"),
|
|
},
|
|
tabs: {
|
|
template: systemPath("templates/shared/tabs.hbs"),
|
|
},
|
|
beschreibung: {
|
|
template: systemPath("templates/hintergrund/description.hbs"),
|
|
scrollable: [""],
|
|
},
|
|
effects: {
|
|
template: systemPath("templates/shared/effects.hbs"),
|
|
scrollable: [""],
|
|
},
|
|
};
|
|
|
|
_addSpecifics(context) {
|
|
if (context.source.type === "legende") {
|
|
const schicksalsgaben = context.actor.items.filter((x) => x.type === "schicksalsgabe");
|
|
context.schicksalsgaben = schicksalsgaben;
|
|
}
|
|
}
|
|
}
|