From 517bd2f50b98c29667670613c0682d592657705b Mon Sep 17 00:00:00 2001 From: macniel Date: Fri, 31 Oct 2025 14:07:04 +0100 Subject: [PATCH] removes strange loca key --- src/main.mjs | 19 +++---------------- src/module/sheets/SpeciesSheet.mjs | 10 ++++++++++ ...eEffectSheet.mjs => activeEffectSheet.mjs} | 10 ++++++++++ src/module/sheets/advantageSheet.mjs | 10 ++++++++++ src/module/sheets/characterSheet.mjs | 9 +++++++++ src/module/sheets/creatureSheet.mjs | 10 ++++++++++ .../{CultureSheet.mjs => cultureSheet.mjs} | 10 ++++++++++ src/module/sheets/equipmentSheet.mjs | 10 ++++++++++ src/module/sheets/groupSheet.mjs | 10 ++++++++++ src/module/sheets/liturgySheet.mjs | 10 ++++++++++ src/module/sheets/merchantSheet.mjs | 10 ++++++++++ ...rofessionSheet.mjs => professionSheet.mjs} | 10 ++++++++++ src/module/sheets/skillSheet.mjs | 10 ++++++++++ src/module/sheets/specialAbilitySheet.mjs | 10 ++++++++++ src/module/sheets/spellSheet.mjs | 10 ++++++++++ 15 files changed, 142 insertions(+), 16 deletions(-) rename src/module/sheets/{ActiveEffectSheet.mjs => activeEffectSheet.mjs} (89%) rename src/module/sheets/{CultureSheet.mjs => cultureSheet.mjs} (88%) rename src/module/sheets/{ProfessionSheet.mjs => professionSheet.mjs} (88%) diff --git a/src/main.mjs b/src/main.mjs index a6f57f06..b77cf4e8 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -18,15 +18,15 @@ import {LiturgyDataModel} from "./module/data/liturgy.mjs"; import {BlessingDataModel} from "./module/data/blessing.mjs"; import {SpecialAbilityDataModel} from "./module/data/specialAbility.mjs"; import {SpecialAbilitySheet} from "./module/sheets/specialAbilitySheet.mjs"; -import {ActiveEffectSheet} from "./module/sheets/ActiveEffectSheet.mjs"; +import {ActiveEffectSheet} from "./module/sheets/activeEffectSheet.mjs"; import {ActiveEffectDataModel} from "./module/data/activeeffect.mjs"; import {Trefferzone, Wunde, Zonenruestung, Zonenwunde} from "./module/data/Trefferzone.js"; import {ProfessionDataModel} from "./module/data/profession.mjs"; import {SpeciesDataModel} from "./module/data/species.mjs"; import {CultureDataModel} from "./module/data/culture.mjs"; -import {CultureSheet} from "./module/sheets/CultureSheet.mjs"; +import {CultureSheet} from "./module/sheets/cultureSheet.mjs"; import {SpeciesSheet} from "./module/sheets/SpeciesSheet.mjs"; -import {ProfessionSheet} from "./module/sheets/ProfessionSheet.mjs"; +import {ProfessionSheet} from "./module/sheets/professionSheet.mjs"; import {XmlImportDialog} from "./module/dialog/xmlImportDialog.mjs"; import {MerchantDataModel} from "./module/data/merchant.mjs"; import {MerchantSheet} from "./module/sheets/merchantSheet.mjs"; @@ -167,52 +167,42 @@ Hooks.once("init", () => { foundry.documents.collections.Actors.registerSheet('dsa41.character', CharacterSheet, { types: ["character"], makeDefault: true, - label: 'DSA41.CharacterLabels.Item' }) foundry.documents.collections.Actors.registerSheet('dsa41.creature', CreatureSheet, { types: ["creature"], makeDefault: true, - label: 'DSA41.CreatureLabel.Item' }) foundry.documents.collections.Actors.registerSheet('dsa41.group', GroupSheet, { types: ["group"], makeDefault: true, - label: 'DSA41.GroupLabel.Item' }) foundry.documents.collections.Items.registerSheet('dsa41.skill', SkillSheet, { types: ["Skill"], makeDefault: true, - label: 'DSA41.SkillLabels.Item', }); foundry.documents.collections.Items.registerSheet('dsa41.spell', SpellSheet, { types: ["Spell"], makeDefault: true, - label: 'DSA41.SpellLabels.Item', }); foundry.documents.collections.Items.registerSheet('dsa41.advantage', AdvantageSheet, { types: ["Advantage"], makeDefault: true, - label: 'DSA41.VornachteilLabels.Item' }) foundry.documents.collections.Items.registerSheet('dsa41.equipment', EquipmentSheet, { types: ["Equipment"], makeDefault: false, - label: 'DSA41.AusruestungLabels.Item' }) foundry.documents.collections.Items.registerSheet('dsa41.liturgy', LiturgySheet, { types: ["Liturgy"], makeDefault: true, - label: 'DSA41.LiturgyLabels.Item' }) foundry.documents.collections.Items.registerSheet('dsa41.specialAbility', SpecialAbilitySheet, { types: ["SpecialAbility"], makeDefault: true, - label: 'DSA41.SpecialAbilityLabels.Item' }) foundry.documents.collections.Items.registerSheet('dsa41.activeEffect', ActiveEffectSheet, { types: ['ActiveEffect'], makeDefault: true, - label: 'DSA41.ActiveEffectLabels.ActiveEffect' }) foundry.documents.collections.Items.registerSheet('dsa41.culture', CultureSheet, { types: ['Culture'], @@ -222,17 +212,14 @@ Hooks.once("init", () => { foundry.documents.collections.Items.registerSheet('dsa41.spezien', SpeciesSheet, { types: ['Species'], makeDefault: true, - label: 'DSA41.SpeciesLabels.Species' }) foundry.documents.collections.Items.registerSheet('dsa41.profession', ProfessionSheet, { types: ['Profession'], makeDefault: true, - label: 'DSA41.ProfessionLabels.Profession' }) foundry.documents.collections.Actors.registerSheet('dsa41.merchant', MerchantSheet, { types: ['Merchant'], makeDefault: true, - label: 'DSA41.MerchantLabels.MerchantLabel' }) game.settings.register('DSA_4-1', 'optional_colorfuldice', { diff --git a/src/module/sheets/SpeciesSheet.mjs b/src/module/sheets/SpeciesSheet.mjs index 41e8b845..f9d04339 100644 --- a/src/module/sheets/SpeciesSheet.mjs +++ b/src/module/sheets/SpeciesSheet.mjs @@ -24,6 +24,16 @@ export class SpeciesSheet extends HandlebarsApplicationMixin(DocumentSheetV2) { }, } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {SpeciesSheet} diff --git a/src/module/sheets/ActiveEffectSheet.mjs b/src/module/sheets/activeEffectSheet.mjs similarity index 89% rename from src/module/sheets/ActiveEffectSheet.mjs rename to src/module/sheets/activeEffectSheet.mjs index 9e422c6e..368fd73d 100644 --- a/src/module/sheets/ActiveEffectSheet.mjs +++ b/src/module/sheets/activeEffectSheet.mjs @@ -32,6 +32,16 @@ export class ActiveEffectSheet extends HandlebarsApplicationMixin(DocumentSheetV effect.sheet.render(true) } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {AdvantageSheet} diff --git a/src/module/sheets/advantageSheet.mjs b/src/module/sheets/advantageSheet.mjs index 957e3475..94c98341 100644 --- a/src/module/sheets/advantageSheet.mjs +++ b/src/module/sheets/advantageSheet.mjs @@ -33,6 +33,16 @@ export class AdvantageSheet extends HandlebarsApplicationMixin(DocumentSheetV2) } } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {AdvantageSheet} diff --git a/src/module/sheets/characterSheet.mjs b/src/module/sheets/characterSheet.mjs index d918cb5a..5fdbd5ee 100644 --- a/src/module/sheets/characterSheet.mjs +++ b/src/module/sheets/characterSheet.mjs @@ -239,6 +239,15 @@ class CharacterSheet extends HandlebarsApplicationMixin(ActorSheetV2) { } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } /** * Handle form submission diff --git a/src/module/sheets/creatureSheet.mjs b/src/module/sheets/creatureSheet.mjs index 88ca33ef..ccaece94 100644 --- a/src/module/sheets/creatureSheet.mjs +++ b/src/module/sheets/creatureSheet.mjs @@ -69,6 +69,16 @@ export class CreatureSheet extends HandlebarsApplicationMixin(ActorSheetV2) { return tabs } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {AdvantageSheet} diff --git a/src/module/sheets/CultureSheet.mjs b/src/module/sheets/cultureSheet.mjs similarity index 88% rename from src/module/sheets/CultureSheet.mjs rename to src/module/sheets/cultureSheet.mjs index abd78fda..3b7e386a 100644 --- a/src/module/sheets/CultureSheet.mjs +++ b/src/module/sheets/cultureSheet.mjs @@ -24,6 +24,16 @@ export class CultureSheet extends HandlebarsApplicationMixin(DocumentSheetV2) { }, } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {CultureSheet} diff --git a/src/module/sheets/equipmentSheet.mjs b/src/module/sheets/equipmentSheet.mjs index 7f0f4238..c9416f84 100644 --- a/src/module/sheets/equipmentSheet.mjs +++ b/src/module/sheets/equipmentSheet.mjs @@ -73,6 +73,16 @@ export class EquipmentSheet extends HandlebarsApplicationMixin(DocumentSheetV2) } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {EquipmentSheet} diff --git a/src/module/sheets/groupSheet.mjs b/src/module/sheets/groupSheet.mjs index 60a0102d..178ad1cc 100644 --- a/src/module/sheets/groupSheet.mjs +++ b/src/module/sheets/groupSheet.mjs @@ -57,6 +57,16 @@ export class GroupSheet extends HandlebarsApplicationMixin(ActorSheetV2) { super(options); } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {AdvantageSheet} diff --git a/src/module/sheets/liturgySheet.mjs b/src/module/sheets/liturgySheet.mjs index 5c6a958f..01d91d05 100644 --- a/src/module/sheets/liturgySheet.mjs +++ b/src/module/sheets/liturgySheet.mjs @@ -38,6 +38,16 @@ export class LiturgySheet extends HandlebarsApplicationMixin(DocumentSheetV2) { } } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {EquipmentSheet} diff --git a/src/module/sheets/merchantSheet.mjs b/src/module/sheets/merchantSheet.mjs index 85f9130c..87d0b104 100644 --- a/src/module/sheets/merchantSheet.mjs +++ b/src/module/sheets/merchantSheet.mjs @@ -59,6 +59,16 @@ export class MerchantSheet extends HandlebarsApplicationMixin(ActorSheetV2) { super(options); } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {AdvantageSheet} diff --git a/src/module/sheets/ProfessionSheet.mjs b/src/module/sheets/professionSheet.mjs similarity index 88% rename from src/module/sheets/ProfessionSheet.mjs rename to src/module/sheets/professionSheet.mjs index dbaa2465..6b0aab3c 100644 --- a/src/module/sheets/ProfessionSheet.mjs +++ b/src/module/sheets/professionSheet.mjs @@ -24,6 +24,16 @@ export class ProfessionSheet extends HandlebarsApplicationMixin(DocumentSheetV2) }, } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {ProfessionSheet} diff --git a/src/module/sheets/skillSheet.mjs b/src/module/sheets/skillSheet.mjs index 3ea4f5d9..5f05faee 100644 --- a/src/module/sheets/skillSheet.mjs +++ b/src/module/sheets/skillSheet.mjs @@ -37,6 +37,16 @@ export class SkillSheet extends HandlebarsApplicationMixin(DocumentSheetV2) { } } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {SkillSheet} diff --git a/src/module/sheets/specialAbilitySheet.mjs b/src/module/sheets/specialAbilitySheet.mjs index f12dc7d7..7a8e5143 100644 --- a/src/module/sheets/specialAbilitySheet.mjs +++ b/src/module/sheets/specialAbilitySheet.mjs @@ -34,6 +34,16 @@ export class SpecialAbilitySheet extends HandlebarsApplicationMixin(DocumentShee }, } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {EquipmentSheet} diff --git a/src/module/sheets/spellSheet.mjs b/src/module/sheets/spellSheet.mjs index 2e793d9e..66fecbf5 100644 --- a/src/module/sheets/spellSheet.mjs +++ b/src/module/sheets/spellSheet.mjs @@ -42,6 +42,16 @@ export class SpellSheet extends HandlebarsApplicationMixin(DocumentSheetV2) { } } + _configureRenderOptions(options) { + super._configureRenderOptions(options) + + if (options.window) { + options.window.title = this.document.name + } + + return options + } + /** * Handle form submission * @this {SpellSheet}