Initial import with skill sheet worning
This commit is contained in:
@ -1,24 +1,27 @@
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
import { CATEGORY } from "../config/weapon.mjs"
|
||||
export default class LethalFantasyWeapon extends foundry.abstract.TypeDataModel {
|
||||
export default class LethalFantasySkill extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields
|
||||
const schema = {}
|
||||
const requiredInteger = { required: true, nullable: false, integer: true }
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
schema.categorie = new fields.StringField({ required: true, initial: "mains", choices: SYSTEM.WEAPON_CATEGORY })
|
||||
schema.degats = new fields.StringField({
|
||||
schema.category = new fields.StringField({ required: true, initial: "melee", choices: SYSTEM.WEAPON_CATEGORY })
|
||||
schema.damages = new fields.StringField({
|
||||
required: true,
|
||||
initial: SYSTEM.WEAPON_DAMAGE.UN,
|
||||
choices: Object.fromEntries(Object.entries(SYSTEM.WEAPON_DAMAGE).map(([key, value]) => [value, { label: `${value}` }])),
|
||||
initial: ""
|
||||
})
|
||||
schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.money = new fields.StringField({ required: true, initial: "tinbit", choices: SYSTEM.MONEY })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static LOCALIZATION_PREFIXES = ["TENEBRIS.Weapon"]
|
||||
static LOCALIZATION_PREFIXES = ["LETHALFANTASY.Weapon"]
|
||||
|
||||
get weaponCategory() {
|
||||
return game.i18n.localize(CATEGORY[this.categorie].label)
|
||||
return game.i18n.localize(CATEGORY[this.category].label)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user