Files
fvtt-machine-gods-noxian-ex…/module/models/equipment.mjs
T
2026-05-05 13:55:42 +02:00

30 lines
851 B
JavaScript

import { SYSTEM } from "../config/system.mjs"
import { booleanField, htmlField, numberField } from "./shared.mjs"
export default class MGNEEquipment extends foundry.abstract.TypeDataModel {
static defineSchema() {
return {
description: htmlField(""),
subtype: new foundry.data.fields.StringField({
required: true,
nullable: false,
initial: "gear",
choices: SYSTEM.equipmentSubtypes,
}),
quantity: numberField(1, 0),
carried: booleanField(true),
equipped: booleanField(false),
usageDie: new foundry.data.fields.StringField({
required: true,
nullable: false,
initial: "d6",
choices: SYSTEM.usageDieChoices,
}),
consumable: booleanField(false),
}
}
/** @override */
static LOCALIZATION_PREFIXES = ["MGNE.Equipment"]
}