RC-21 | Hero | Guts Data
This commit is contained in:
parent
9f0fea1467
commit
4406531713
2 changed files with 22 additions and 0 deletions
20
module/data/helpers.mjs
Normal file
20
module/data/helpers.mjs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
const { fields } = foundry.data;
|
||||
|
||||
export function barAttribute(min, initial, max = undefined) {
|
||||
return new fields.SchemaField({
|
||||
value: new fields.NumberField({
|
||||
min,
|
||||
initial,
|
||||
max,
|
||||
integer: true,
|
||||
nullable: false,
|
||||
}),
|
||||
max: new fields.NumberField({
|
||||
min,
|
||||
initial,
|
||||
max,
|
||||
integer: true,
|
||||
nullable: false,
|
||||
}),
|
||||
});
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue