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 M6ArmorSheet extends M6ItemSheet { static get DEFAULT_OPTIONS() { return { ...super.DEFAULT_OPTIONS, // Kopiert alle bestehenden Actions aus M6ItemSheet actions: { ...super.DEFAULT_OPTIONS.actions, cycleEquip: this.#cycleEquip, // Fügt NUR für dieses Sheet die neue Action hinzu cycleHelmet: this.#cycleHelmet } }; } static TABS = { primary: { tabs: [ { id: "eigenschaften", icon: "fa-shield-halved" }, { id: "beschreibung", icon: "fa-feather-pointed" } // { // id: "effects", // icon: "fa-bolt" // } ], initial: "eigenschaften", labelPrefix: "Midgard6.Sheets.Tabs" } }; /** @inheritdoc */ static PARTS = { header: { template: systemPath("templates/item/header.hbs") }, tabs: { template: systemPath("templates/shared/tabs.hbs") }, eigenschaften: { template: systemPath("templates/item/rüstung/eigenschaften.hbs"), scrollable: [""] }, beschreibung: { template: systemPath("templates/item/description.hbs"), scrollable: [""] } // effects: { // template: systemPath("templates/shared/effects.hbs"), // scrollable: [""] // } }; static #cycleEquip() { this.item.update({ system: { equipped: !this.item.system.equipped } }); } static #cycleHelmet() { this.item.update({ system: { zusätzlich: !this.item.system.zusätzlich } }); } }