diff --git a/daggerheart.mjs b/daggerheart.mjs index 77273b6c..6c7fb17e 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -217,17 +217,6 @@ Hooks.once('init', () => { label: sheetLabel('DOCUMENT.ActiveEffect') } ); - DocumentSheetConfig.registerSheet( - CONFIG.ActiveEffect.documentClass, - SYSTEM.id, - applications.sheetConfigs.ArmorActiveEffectConfig, - { - types: ['armor'], - makeDefault: true, - label: () => - `${game.i18n.localize('TYPES.ActiveEffect.armor')} ${game.i18n.localize('DAGGERHEART.GENERAL.effect')}` - } - ); game.socket.on(`system.${SYSTEM.id}`, socketRegistration.handleSocketEvent); diff --git a/lang/en.json b/lang/en.json index ea89ca2d..056c7964 100755 --- a/lang/en.json +++ b/lang/en.json @@ -16,8 +16,7 @@ "ActiveEffect": { "base": "Standard", "beastform": "Beastform", - "horde": "Horde", - "armor": "Armor" + "horde": "Horde" }, "Actor": { "character": "Character", diff --git a/module/applications/sheets-configs/_module.mjs b/module/applications/sheets-configs/_module.mjs index 8b09dc29..d3fb3c39 100644 --- a/module/applications/sheets-configs/_module.mjs +++ b/module/applications/sheets-configs/_module.mjs @@ -6,7 +6,6 @@ export { default as CompanionSettings } from './companion-settings.mjs'; export { default as SettingActiveEffectConfig } from './setting-active-effect-config.mjs'; export { default as SettingFeatureConfig } from './setting-feature-config.mjs'; export { default as EnvironmentSettings } from './environment-settings.mjs'; -export { default as ArmorActiveEffectConfig } from './armorActiveEffectConfig.mjs'; export { default as ActiveEffectConfig } from './activeEffectConfig.mjs'; export { default as DhTokenConfig } from './token-config.mjs'; export { default as DhPrototypeTokenConfig } from './prototype-token-config.mjs'; diff --git a/module/applications/sheets-configs/armorActiveEffectConfig.mjs b/module/applications/sheets-configs/armorActiveEffectConfig.mjs deleted file mode 100644 index 3dca8ef1..00000000 --- a/module/applications/sheets-configs/armorActiveEffectConfig.mjs +++ /dev/null @@ -1,67 +0,0 @@ -const { HandlebarsApplicationMixin, DocumentSheetV2 } = foundry.applications.api; - -export default class ArmorActiveEffectConfig extends HandlebarsApplicationMixin(DocumentSheetV2) { - static DEFAULT_OPTIONS = { - tag: 'form', - classes: ['daggerheart', 'sheet', 'dh-style', 'active-effect-config', 'armor-effect-config'], - form: { - handler: this.updateForm, - submitOnChange: true, - closeOnSubmit: false - }, - position: { width: 560 }, - actions: { - finish: ArmorActiveEffectConfig.#finish - } - }; - - static PARTS = { - header: { template: 'systems/daggerheart/templates/sheets/activeEffect/header.hbs' }, - tabs: { template: 'templates/generic/tab-navigation.hbs' }, - details: { template: 'systems/daggerheart/templates/sheets/activeEffect/armor/details.hbs' }, - settings: { template: 'systems/daggerheart/templates/sheets/activeEffect/armor/settings.hbs' }, - footer: { template: 'systems/daggerheart/templates/sheets/activeEffect/armor/footer.hbs' } - }; - - static TABS = { - sheet: { - tabs: [ - { id: 'details', icon: 'fa-solid fa-book' }, - { id: 'settings', icon: 'fa-solid fa-bars', label: 'DAGGERHEART.GENERAL.Tabs.settings' } - ], - initial: 'details', - labelPrefix: 'EFFECT.TABS' - } - }; - - async _prepareContext(options) { - const context = await super._prepareContext(options); - context.systemFields = context.document.system.schema.fields; - - return context; - } - - /** @inheritDoc */ - async _preparePartContext(partId, context) { - const partContext = await super._preparePartContext(partId, context); - if (partId in partContext.tabs) partContext.tab = partContext.tabs[partId]; - - switch (partId) { - case 'details': - partContext.isActorEffect = this.document.parent?.documentName === 'Actor'; - partContext.isItemEffect = this.document.parent?.documentName === 'Item'; - break; - } - - return partContext; - } - - static async updateForm(_event, _form, formData) { - await this.document.update(formData.object); - this.render(); - } - - static #finish() { - this.close(); - } -} diff --git a/module/applications/sheets/api/application-mixin.mjs b/module/applications/sheets/api/application-mixin.mjs index 98d68ed9..83313454 100644 --- a/module/applications/sheets/api/application-mixin.mjs +++ b/module/applications/sheets/api/application-mixin.mjs @@ -762,10 +762,6 @@ export default function DHApplicationMixin(Base) { data.system.domain = parent.system.domains[0]; } - if (documentClass === 'ActiveEffect') { - return cls.createDialog(data, { parent: this.document }); - } - const doc = await cls.create(data, { parent, renderSheet: !event.shiftKey }); if (parentIsItem && type === 'feature') { await this.document.update({ diff --git a/module/documents/activeEffect.mjs b/module/documents/activeEffect.mjs index 0fa84255..043d7f33 100644 --- a/module/documents/activeEffect.mjs +++ b/module/documents/activeEffect.mjs @@ -78,7 +78,7 @@ export default class DhActiveEffect extends foundry.documents.ActiveEffect { throw new Error('The array of sub-types to restrict to must not be empty.'); } - const creatableEffects = types || ['base', 'armor']; + const creatableEffects = types || ['base']; const documentTypes = this.TYPES.filter(type => creatableEffects.includes(type)).map(type => { const labelKey = `TYPES.ActiveEffect.${type}`; const label = game.i18n.has(labelKey) ? game.i18n.localize(labelKey) : type; diff --git a/styles/less/sheets/activeEffects/armorEffects.less b/styles/less/sheets/activeEffects/armorEffects.less deleted file mode 100644 index fd5c89b1..00000000 --- a/styles/less/sheets/activeEffects/armorEffects.less +++ /dev/null @@ -1,5 +0,0 @@ -.application.sheet.daggerheart.dh-style.armor-effect-config { - .tab-form-footer { - margin-top: 8px; - } -} diff --git a/styles/less/sheets/index.less b/styles/less/sheets/index.less index 25ec6fc3..e5ffbf3e 100644 --- a/styles/less/sheets/index.less +++ b/styles/less/sheets/index.less @@ -44,4 +44,3 @@ @import './actions/actions.less'; @import './activeEffects/activeEffects.less'; -@import './activeEffects/armorEffects.less';