mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
43 lines
1.4 KiB
JavaScript
43 lines
1.4 KiB
JavaScript
import BaseDataItem from './base.mjs';
|
|
import { armorPriorityKeys } from "../../config/itemConfig.mjs";
|
|
|
|
export default class DHLoot extends BaseDataItem {
|
|
/** @inheritDoc */
|
|
static get metadata() {
|
|
return foundry.utils.mergeObject(super.metadata, {
|
|
label: 'TYPES.Item.loot',
|
|
type: 'loot',
|
|
hasDescription: true,
|
|
isQuantifiable: true,
|
|
isInventoryItem: true,
|
|
hasActions: true
|
|
});
|
|
}
|
|
|
|
/** @inheritDoc */
|
|
static defineSchema() {
|
|
const fields = foundry.data.fields;
|
|
return {
|
|
...super.defineSchema(),
|
|
//Testing new armor schema
|
|
armor: new fields.SchemaField({
|
|
value: new fields.NumberField({required: true, integer: true, min: 0, initial: 0}),
|
|
max: new fields.NumberField({required: true, integer: true, min: 0, initial: 0}),
|
|
priority: new fields.StringField({
|
|
required: true,
|
|
choices: armorPriorityKeys,
|
|
initial: 'loot'
|
|
}),
|
|
armorResourceToggle: new fields.BooleanField({initial: false})
|
|
}),
|
|
//End
|
|
};
|
|
}
|
|
|
|
/* -------------------------------------------- */
|
|
|
|
/**@override */
|
|
static DEFAULT_ICON = 'systems/daggerheart/assets/icons/documents/items/open-treasure-chest.svg';
|
|
|
|
/* -------------------------------------------- */
|
|
}
|