confirm character creation if equipment not selected

This commit is contained in:
Christopher Brown 2025-08-11 17:43:18 +02:00
parent 67d3b6c0e3
commit 1a42e15071

View file

@ -571,6 +571,15 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
}
static async finish() {
const isEquipmentFinished = this._getTabs(this.constructor.TABS).equipment.finished;
if (!isEquipmentFinished) {
const confirm = await foundry.applications.api.DialogV2.confirm({
window: { title: 'Equipment not selected' },
content: `<p>You have not selected equipment.</p><p>Are you sure you want to continue?</p></p>`
});
if (!confirm) return;
}
const primaryAncestryFeature = this.setup.primaryAncestry.system.primaryFeature;
const secondaryAncestryFeature = this.setup.secondaryAncestry?.uuid
? this.setup.secondaryAncestry.system.secondaryFeature