RC-98 | Add quantity to items
This commit is contained in:
parent
aa05cdde46
commit
3cff9fda7d
8 changed files with 57 additions and 4 deletions
20
module/data/Item/Common.mjs
Normal file
20
module/data/Item/Common.mjs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { requiredInteger } from "../helpers.mjs";
|
||||
|
||||
export class CommonItemData extends foundry.abstract.TypeDataModel {
|
||||
// MARK: Schema
|
||||
static defineSchema() {
|
||||
return {
|
||||
quantity: requiredInteger({ min: 0, initial: 1 }),
|
||||
};
|
||||
};
|
||||
|
||||
// MARK: Base Data
|
||||
prepareBaseData() {
|
||||
super.prepareBaseData();
|
||||
};
|
||||
|
||||
// MARK: Derived Data
|
||||
prepareDerivedData() {
|
||||
super.prepareDerivedData();
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue