RC-92 | Datamodel Defined Input Definition
This commit is contained in:
parent
94c89f72e1
commit
4b423a0729
5 changed files with 43 additions and 2 deletions
|
|
@ -55,4 +55,23 @@ export class WeaponData extends foundry.abstract.TypeDataModel {
|
|||
return String(this.range.short ?? this.range.long ?? ``);
|
||||
}
|
||||
// #endregion
|
||||
|
||||
// #region Sheet Data
|
||||
get formFields() {
|
||||
const fields = [
|
||||
{ type: `set`, label: `Traits` },
|
||||
{ type: `integer`, label: `Short Range` },
|
||||
{ type: `integer`, label: `Long Range` },
|
||||
{ type: `integer`, label: `Damage` },
|
||||
{ type: `bar`, label: `Wear` },
|
||||
{ type: `dropdown`, label: `Access` },
|
||||
];
|
||||
|
||||
if (this.parent.isEmbedded) {
|
||||
fields.push({ type: `boolean`, label: `Equipped` });
|
||||
};
|
||||
|
||||
return fields;
|
||||
};
|
||||
// #endregion
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue