repairs skill sheet and buries display of skill requirements, for now.
parent
09db6091ba
commit
6d178b8793
|
|
@ -1,6 +1,14 @@
|
||||||
import BaseItem from "./base-item.mjs";
|
import BaseItem from "./base-item.mjs";
|
||||||
|
|
||||||
const {BooleanField, ArrayField, NumberField, SchemaField, StringField, HTMLField} = foundry.data.fields;
|
const {
|
||||||
|
BooleanField,
|
||||||
|
DocumentIdField,
|
||||||
|
ArrayField,
|
||||||
|
NumberField,
|
||||||
|
SchemaField,
|
||||||
|
StringField,
|
||||||
|
HTMLField
|
||||||
|
} = foundry.data.fields;
|
||||||
|
|
||||||
export class SkillDataModel extends BaseItem {
|
export class SkillDataModel extends BaseItem {
|
||||||
|
|
||||||
|
|
@ -13,9 +21,9 @@ export class SkillDataModel extends BaseItem {
|
||||||
pa: new NumberField({required: false, integer: true, nullable: true, initial: 0}),
|
pa: new NumberField({required: false, integer: true, nullable: true, initial: 0}),
|
||||||
probe: new ArrayField(new StringField(), {exact: 3}), // References one of the eight attributes by name
|
probe: new ArrayField(new StringField(), {exact: 3}), // References one of the eight attributes by name
|
||||||
voraussetzung: new SchemaField({
|
voraussetzung: new SchemaField({
|
||||||
talent: new StringField({model: SkillDataModel}),
|
talent: new DocumentIdField(),
|
||||||
wert: new NumberField({}),
|
wert: new NumberField(),
|
||||||
}), // Required skills at a given level
|
}, {required: false}), // Required skills at a given level
|
||||||
talent: new HTMLField({required: true}),
|
talent: new HTMLField({required: true}),
|
||||||
behinderung: new NumberField({required: false}), // BE-X
|
behinderung: new NumberField({required: false}), // BE-X
|
||||||
komplexität: new NumberField({required: false}), // In case of languages
|
komplexität: new NumberField({required: false}), // In case of languages
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ export class SkillSheet extends foundry.appv1.sheets.ItemSheet {
|
||||||
{
|
{
|
||||||
navSelector: '.sheet-tabs',
|
navSelector: '.sheet-tabs',
|
||||||
contentSelector: '.sheet-body',
|
contentSelector: '.sheet-body',
|
||||||
initial: 'description',
|
initial: 'meta',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
@ -40,11 +40,16 @@ export class SkillSheet extends foundry.appv1.sheets.ItemSheet {
|
||||||
Gesellschaft: "Gesellschaft",
|
Gesellschaft: "Gesellschaft",
|
||||||
Natur: "Natur",
|
Natur: "Natur",
|
||||||
Wissen: "Wissen",
|
Wissen: "Wissen",
|
||||||
Sprachen: "Sprache",
|
Sprachen: "Sprachen",
|
||||||
Schriften: "Schriften",
|
Schriften: "Schriften",
|
||||||
Handwerk: "Handwerk"
|
Handwerk: "Handwerk"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context.isCombat = context.system.gruppe === "Kampf"
|
||||||
|
context.isTalent = context.system.gruppe !== "Kampf"
|
||||||
|
context.isLanguage = context.system.gruppe === "Sprachen" || context.system.gruppe === "Schriften"
|
||||||
|
context.hasRequirement = context.system.voraussetzung.talent != null
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,7 +57,9 @@ export class SkillSheet extends foundry.appv1.sheets.ItemSheet {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
|
|
||||||
// Everything below here is only needed if the sheet is editable
|
// Everything below here is only needed if the sheet is editable
|
||||||
if (!this.isEditable)
|
if (!this.isEditable) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue