adds ruletext and requisite
parent
2414f3b8f3
commit
51ad48d058
|
|
@ -1,4 +1,4 @@
|
||||||
const { BooleanField, NumberField, SchemaField, SetField, StringField } = foundry.data.fields;
|
const { BooleanField, NumberField, SchemaField, SetField, StringField, HtmlField } = foundry.data.fields;
|
||||||
|
|
||||||
export class Skill extends foundry.abstract.TypeDataModel {
|
export class Skill extends foundry.abstract.TypeDataModel {
|
||||||
|
|
||||||
|
|
@ -9,6 +9,8 @@ export class Skill extends foundry.abstract.TypeDataModel {
|
||||||
attributeReference1: new StringField(), // References one of the eight attributes by name
|
attributeReference1: new StringField(), // References one of the eight attributes by name
|
||||||
attributeReference2: new StringField(), // References one of the eight attributes by name
|
attributeReference2: new StringField(), // References one of the eight attributes by name
|
||||||
attributeReference3: new StringField(), // References one of the eight attributes by name
|
attributeReference3: new StringField(), // References one of the eight attributes by name
|
||||||
|
requisite: new StringField(), // Required skills at a given level
|
||||||
|
text: new HtmlField(),
|
||||||
handicapValue: new NumberField(), // BE-X
|
handicapValue: new NumberField(), // BE-X
|
||||||
complexity: new NumberField(), // In case of languages
|
complexity: new NumberField(), // In case of languages
|
||||||
derivedAttribute1: new NumberField(),
|
derivedAttribute1: new NumberField(),
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,15 @@ export class SkillSheet extends ItemSheet {
|
||||||
// Add the actor's data to context.data for easier access, as well as flags.
|
// Add the actor's data to context.data for easier access, as well as flags.
|
||||||
context.system = skillData.system;
|
context.system = skillData.system;
|
||||||
context.flags = skillData.flags;
|
context.flags = skillData.flags;
|
||||||
|
context.categoryOptions = {
|
||||||
|
combat: "Kampf",
|
||||||
|
physical: "Körperlich",
|
||||||
|
social: "Gesellschaft",
|
||||||
|
survival: "Natur",
|
||||||
|
knowledge: "Wissen",
|
||||||
|
languages: "Sprache und Schriften",
|
||||||
|
crafting: "Handwerk"
|
||||||
|
}
|
||||||
|
|
||||||
return context;
|
return context;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,9 @@
|
||||||
},
|
},
|
||||||
"Item": {
|
"Item": {
|
||||||
"skill": {
|
"skill": {
|
||||||
"StringField": ["name", "category", "attributeReference1", "attributeReference2", "attributeReference3"],
|
"StringField": ["name", "category", "attributeReference1", "attributeReference2", "attributeReference3", "requisite"],
|
||||||
"NumberField": ["handicapValue", "complexity"]
|
"NumberField": ["handicapValue", "complexity"],
|
||||||
|
"HtmlField": ["text"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,21 +8,32 @@
|
||||||
|
|
||||||
{{!-- Sheet Tab Navigation --}}
|
{{!-- Sheet Tab Navigation --}}
|
||||||
<nav class="sheet-tabs tabs" data-group="primary">
|
<nav class="sheet-tabs tabs" data-group="primary">
|
||||||
<a class="item" data-tab="description">Description</a>
|
<a class="item" data-tab="meta">Talent</a>
|
||||||
|
<a class="item" data-tab="description">Regeltext</a>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{{!-- Sheet Body --}}
|
{{!-- Sheet Body --}}
|
||||||
<section class="sheet-body">
|
<section class="sheet-body">
|
||||||
<div class="form-fields">
|
|
||||||
|
<div class="tab meta" data-group="primary" data-tab="meta">
|
||||||
|
|
||||||
|
<label>Kategorie
|
||||||
|
<select type="text" name="system.category.value">
|
||||||
|
{{selectOptions categoryOptions selected=value}}
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
|
||||||
<label>Erstes Attribut
|
<label>Erstes Attribut
|
||||||
<input type="text" name="system.attributeReference1.value" value="{{system.attributeReference1.value}}" />
|
<input type="text" name="system.attributeReference1.value"
|
||||||
|
value="{{system.attributeReference1.value}}" />
|
||||||
</label>
|
</label>
|
||||||
<label>Zweites Attribut
|
<label>Zweites Attribut
|
||||||
<input type="text" name="system.attributeReference2.value" value="{{system.attributeReference2.value}}" />
|
<input type="text" name="system.attributeReference2.value"
|
||||||
|
value="{{system.attributeReference2.value}}" />
|
||||||
</label>
|
</label>
|
||||||
<label>Drittes Attribut
|
<label>Drittes Attribut
|
||||||
<input type="text" name="system.attributeReference3.value" value="{{system.attributeReference3.value}}" />
|
<input type="text" name="system.attributeReference3.value"
|
||||||
|
value="{{system.attributeReference3.value}}" />
|
||||||
</label>
|
</label>
|
||||||
<label>Behinderung
|
<label>Behinderung
|
||||||
<input type="text" name="system.hanidcapValue.value" value="{{system.handicapValue.value}}" />
|
<input type="text" name="system.hanidcapValue.value" value="{{system.handicapValue.value}}" />
|
||||||
|
|
@ -32,6 +43,16 @@
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tab description" data-group="primary" data-tab="description">
|
||||||
|
|
||||||
|
<label>Beschreibungstext
|
||||||
|
{{editor system.text target="system.text" button=true owner=owner editable=editable}}
|
||||||
|
</label>
|
||||||
|
<label>Voraussetzung
|
||||||
|
<input type="text" name="system.requisite.value" value="{{system.requisite.value}}" />
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</form>
|
</form>
|
||||||
Loading…
Reference in New Issue