ripcrypt/module/data/Item/Armour.mjs
2025-01-15 19:53:31 -07:00

37 lines
676 B
JavaScript

import { requiredInteger } from "../helpers.mjs";
const { fields } = foundry.data;
export class ArmourData extends foundry.abstract.TypeDataModel {
// MARK: Schema
static defineSchema() {
return {
protection: requiredInteger({ min: 0, initial: 1 }),
};
};
// MARK: Base Data
prepareBaseData() {
super.prepareBaseData();
};
// MARK: Derived Data
prepareDerivedData() {
super.prepareDerivedData();
};
// #region Sheet Data
getFormFields(ctx) {
const fields = [
{
type: `integer`,
label: `RipCrypt.common.protection`,
value: this.protection,
path: `system.protection`,
min: 0,
},
];
return fields;
};
// #endregion
};