RC-45 | Weapon | Access

This commit is contained in:
Oliver-Akins 2024-12-25 22:27:24 -07:00
parent 6cae7900aa
commit 649a75843f
2 changed files with 13 additions and 0 deletions

View file

@ -1,4 +1,5 @@
import { barAttribute, optionalInteger, requiredInteger } from "../helpers.mjs"; import { barAttribute, optionalInteger, requiredInteger } from "../helpers.mjs";
import { gameTerms } from "../../gameTerms.mjs";
const { fields } = foundry.data; const { fields } = foundry.data;
@ -22,6 +23,12 @@ export class WeaponData extends foundry.abstract.TypeDataModel {
}), }),
damage: requiredInteger({ min: 0, initial: 0 }), damage: requiredInteger({ min: 0, initial: 0 }),
wear: barAttribute(0, 0, 4), wear: barAttribute(0, 0, 4),
access: new fields.StringField({
blank: true,
nullable: false,
trim: true,
choices: gameTerms.Access,
}),
}; };
}; };

View file

@ -5,4 +5,10 @@ export const gameTerms = Object.preventExtensions({
`South`, `South`,
`West`, `West`,
], ],
Access: [
`Common`,
`Uncommon`,
`Rare`,
`Scarce`,
],
}); });