Begin adding cost to items
This commit is contained in:
parent
dc5bf7aa07
commit
00228d3aae
7 changed files with 56 additions and 2 deletions
|
|
@ -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`,
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue