Files
tevansandClaude Fable 5 7c29335b0d Baseline: Delta Green official system v1.7.0 (MIT, TheLastScrub)
Pristine copy of the installed deltagreen 1.7.0 release build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-15 17:22:41 +01:00

45 lines
1.0 KiB
JavaScript

import DG, { BASE_TEMPLATE_PATH } from "../config.js";
export default class ActorEditStatForm extends foundry.applications.api.HandlebarsApplicationMixin(
foundry.applications.api.ApplicationV2,
) {
constructor(params) {
super();
this.actor = params.actor;
}
/** @override */
static DEFAULT_OPTIONS = {
tag: "form",
classes: [DG.ID, "edit-stat-form"],
window: { title: "Edit statistics form", resizable: true },
position: { width: 400, height: 200 },
actions: {},
form: {
handler: this.formHandler,
submitOnChange: true,
closeOnSubmit: false,
},
};
static PARTS = /** @type {const} */ ({
stats: {
template: `${BASE_TEMPLATE_PATH}/actor/edit-stats.html`,
},
});
/** @override */
async _prepareContext(options) {
return {
...(await super._prepareContext(options)),
actor: this.actor,
};
}
static async formHandler(event, form, formData) {
const data = formData.object;
await this.actor.update(data);
}
}