Rework des fiches creature/PJ et Tinji/Loksyu
This commit is contained in:
@@ -1,4 +1,2 @@
|
||||
export { default as CharacterDataModel } from "./character.js"
|
||||
export { default as NpcDataModel } from "./npc.js"
|
||||
export { default as TinjiDataModel } from "./tinji.js"
|
||||
export { default as LoksyuDataModel } from "./loksyu.js"
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
export default class LoksyuDataModel extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const { fields } = foundry.data
|
||||
const numberField = (initial = 0, extra = {}) => new fields.NumberField({ required: true, nullable: false, integer: true, initial, ...extra })
|
||||
const htmlField = (initial = "") => new fields.HTMLField({ required: true, nullable: false, initial, textSearch: true })
|
||||
|
||||
const polarity = () =>
|
||||
new fields.SchemaField({
|
||||
yin: new fields.SchemaField({ value: numberField(0, { min: 0 }) }),
|
||||
yang: new fields.SchemaField({ value: numberField(0, { min: 0 }) }),
|
||||
})
|
||||
|
||||
return {
|
||||
fire: polarity(),
|
||||
earth: polarity(),
|
||||
metal: polarity(),
|
||||
water: polarity(),
|
||||
wood: polarity(),
|
||||
description: htmlField(""),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
export default class TinjiDataModel extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const { fields } = foundry.data
|
||||
const numberField = (initial = 0, extra = {}) => new fields.NumberField({ required: true, nullable: false, integer: true, initial, ...extra })
|
||||
const htmlField = (initial = "") => new fields.HTMLField({ required: true, nullable: false, initial, textSearch: true })
|
||||
|
||||
return {
|
||||
value: numberField(0, { min: 0 }),
|
||||
description: htmlField(""),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user