RC-102 | Armour | Protection
This commit is contained in:
parent
6aa89b2173
commit
4948c7e755
2 changed files with 16 additions and 3 deletions
|
|
@ -1,9 +1,13 @@
|
|||
import { requiredInteger } from "../helpers.mjs";
|
||||
|
||||
const { fields } = foundry.data;
|
||||
|
||||
export class ArmourData extends foundry.abstract.TypeDataModel {
|
||||
// MARK: Schema
|
||||
static defineSchema() {
|
||||
return {};
|
||||
return {
|
||||
protection: requiredInteger({ min: 0, initial: 1 }),
|
||||
};
|
||||
};
|
||||
|
||||
// MARK: Base Data
|
||||
|
|
@ -18,7 +22,15 @@ export class ArmourData extends foundry.abstract.TypeDataModel {
|
|||
|
||||
// #region Sheet Data
|
||||
getFormFields(ctx) {
|
||||
const fields = [];
|
||||
const fields = [
|
||||
{
|
||||
type: `integer`,
|
||||
label: `RipCrypt.common.protection`,
|
||||
value: this.protection,
|
||||
path: `system.protection`,
|
||||
min: 0,
|
||||
},
|
||||
];
|
||||
return fields;
|
||||
};
|
||||
// #endregion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue