Begin adding cost to items

This commit is contained in:
Oliver-Akins 2025-02-22 19:21:35 -07:00
parent dc5bf7aa07
commit 00228d3aae
7 changed files with 56 additions and 2 deletions

View file

@ -26,6 +26,14 @@ export class AmmoData extends CommonItemData {
value: this.quantity,
min: 0,
},
{
id: `cost`,
type: `cost`,
label: `RipCrypt.common.cost`,
gold: this.cost.gold,
silver: this.cost.silver,
copper: this.cost.copper,
},
{
id: `access`,
type: `dropdown`,

View file

@ -1,5 +1,5 @@
import { optionalInteger, requiredInteger } from "../helpers.mjs";
import { gameTerms } from "../../gameTerms.mjs";
import { requiredInteger } from "../helpers.mjs";
const { fields } = foundry.data;
@ -14,6 +14,11 @@ export class CommonItemData extends foundry.abstract.TypeDataModel {
trim: true,
choices: gameTerms.Access,
}),
cost: new fields.SchemaField({
gold: optionalInteger(),
silver: optionalInteger(),
copper: optionalInteger(),
}),
};
};