Remove references to the AttributeManager now that it is no longer required

This commit is contained in:
Oliver 2026-04-26 23:52:37 -06:00
parent 0347a00632
commit 14193cbad0
8 changed files with 0 additions and 516 deletions

View file

@ -1,6 +1,5 @@
import { __ID__, filePath } from "../consts.mjs";
import { deleteItemFromElement, editItemFromElement } from "./utils.mjs";
import { AttributeManager } from "./AttributeManager.mjs";
import { config } from "../config.mjs";
import { Logger } from "../utils/Logger.mjs";
import { TAFDocumentSheetConfig } from "./TAFDocumentSheetConfig.mjs";
@ -36,7 +35,6 @@ export class PlayerSheet extends
},
actions: {
createEmbeddedItem: this.#createEmbeddedItem,
manageAttributes: this.#manageAttributes,
configureSheet: this.#configureSheet,
toggleExpand: this.#toggleExpand,
},
@ -194,17 +192,6 @@ export class PlayerSheet extends
const controls = super._getHeaderControls();
controls.push(
{
icon: `fa-solid fa-at`,
label: `taf.Apps.PlayerSheet.manage-attributes`,
action: `manageAttributes`,
visible: () => {
const isGM = game.user.isGM;
const allowPlayerEdits = game.settings.get(__ID__, `canPlayersManageAttributes`);
const editable = this.isEditable;
return isGM || (allowPlayerEdits && editable);
},
},
{
icon: `fa-solid fa-suitcase`,
label: `taf.Apps.PlayerSheet.create-item`,
@ -252,12 +239,6 @@ export class PlayerSheet extends
{ jQuery: false, fixed: true },
);
};
async close() {
this.#attributeManager?.close();
this.#attributeManager = null;
return super.close();
};
// #endregion Lifecycle
// #region Data Prep
@ -412,28 +393,6 @@ export class PlayerSheet extends
// #endregion Data Prep
// #region Actions
#attributeManager = null;
/**
* This action opens an instance of the AttributeManager application
* so that the user can edit and update all of the attributes for the
* actor. This persists the application instance for the duration of
* the ActorSheet's lifespan.
*
* @this {PlayerSheet}
*/
static async #manageAttributes() {
this.#attributeManager ??= new AttributeManager({ document: this.actor });
if (this.#attributeManager.rendered) {
await this.#attributeManager.bringToFront();
} else {
await this.#attributeManager.render({
force: true,
window: { windowId: this.window.windowId },
});
};
};
/**
* This action overrides the default Foundry action in order to tell
* it to open my custom DocumentSheetConfig application instead of